View Single Post
  #53  
Old 08-30-2010, 10:38 PM
  lewaff's Avatar 
lewaff lewaff is offline
 

eXpert
  
Join Date: Jun 2007
Location: Nuneaton-England
Posts: 225
 

Default Re: How do I change the "out of stock" message to "sold out"?

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}
__________________
Thank's
Lewis Afford
www.mobile-phone-batteries.eu X-cart v4.4.5 gold
www.mobile-phone-batteries.co.ukv4.4.5 gold
www.qualitechnic.co.uk v4.4.5 gold
Add-on: X-AOM (Advanced Order Management)
Reply With Quote