[ic] Stock display change (TRY THIS INSTEAD)

Michael Goldfarb interchange-users@icdevgroup.org
Tue Nov 5 19:34:00 2002


>> I would think that the easiest way to do this would be to add a new
>> column to the products table. You can then edit
>> products-->mv_metadata.asc to add a field for that column on the item
>> entry screen (requires applying changes after editing).
>>
>> For instance, create a column labeled something like "ship_code" to
the
>> products table. Once you have the data in that column for the items,
you
>> can show it on flypage.html with [item-field ship_code] wherever you
>> want it to display.
>>
>> Hope this helps.
>>
>
>Thanks!
>
>I'll try to do that.. and find and replace all instances of current
stock
>display with my new "ship_code".
>
>Regards,
>Saso

I totally forgot that there are already provisions for custom stock
messages. The way I recommended previously doesn't take advantage of
these provisions.

Try doing this:

You should be able to select one of the canned "Out of Stock" messages
on the Inventory screen associated with the items. You can get to this
screen by clicking on the associated inventory column on the main Items
page.

When that screen comes up you should see a field for "Out of Stock
Message." Click the "Meta" link for that field and enter your custom
message options in the Options field and then click OK (I think it is a
comma-delimited list). You should then see your choices in the "Out of
Stock Message" drop-down.

That is where you can select the message to associate when each item is
out of stock.

Once you have done that, enter something like this onto your
flypage.html where you want it to display.

[query sql="select stock_message from inventory where sku =
'[item-code]'" list=1]
[sql-pos 0]
[/query]

You could therefore have something that looks like this for your stock
message:

[if-item-data inventory quantity < 1]
[query sql="select stock_message from inventory where sku =
'[item-code]'" list=1]
[sql-pos 0]
[/query]  
<a href="[area stock-alert [item-code]]">In-Stock Notification</a>
[else]
<b>In Stock</b>
[/else]
[/if-item-data]

Hope that helps and sorry if my previous post confused you. I should
have known that better provision had been made :)