Thanks again
I have tried this My extra field shows "stock_indicator"
but it dont show any messages
I did fix the sintax error /if*}
{foreach from=$extra_fields item=v}
{if $v.active eq "Y" && $v.name eq "stock_indicator"}
{if $v.field_value eq "0"}
{* no items in stock *}
SHOW MESSAGE FOR ITEM OUT OF STOCK
{elseif $v.field_value eq "-1"}
{* item discontinued *}
SHOW MESSAGE FOR ITEM DISCONTINUED
{else}
{* any value (or no value, empty field), except 0 and -1 *}
SHOW MESSAGE ITEM IN STOCK
{/if}
{/if}
{/foreach}
also I want it to work with "Quantity in stock (items):" field which works with the live stock levels on the store
If you see what i mean
thanks again
lewis
Quote:
Originally Posted by cflsystems
Try this, replace "in_stock" with the name of the field you created. This goes in skin1/customer/main/product_details.tpl for 4.3
Code:
{foreach from=$extra_fields item=v}
{if $v.active eq "Y" && $v.name eq "in_stock"}
{if $v.field_value eq "0"}
{* no items in stock *}
SHOW MESSAGE FOR ITEM OUT OF STOCK
{elseif $v.field_value eq "-1"}
{* item discontinued *}
SHOW MESSAGE FOR ITEM DISCONTINUED
{else}
{* any value (or no value, empty field), except 0 and -1 *}
SHOW MESSAGE ITEM IN STOCK
/if}
{/if}
{/foreach}
|