View Single Post
  #23  
Old 08-26-2010, 09:23 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

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

In skin1/main/product_details.tpl the code that was added to create the extra field in your "Add new product" is as follows. You would need to add it where you want your extra field to appear

Code:
{/if} <tr> {if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[stock_indicator]" /></td>{/if} <td class="FormButton" nowrap="nowrap">{$lng.lbl_stock_indicator}</td> <td class="ProductDetails"> <input type="text" name="stock_indicator" size="2" value="{$product.stock_indicator}" /> </td> </tr>


In skin1/customer/main/product.tpl this code was added

Code:
<tr> <td>Availabilty:</td> <td> {if $product.stock_indicator ge 1} <span style="color: green; font-size: 12px; font-weight: bold;">{$lng.lbl_product_in_stock_now|regex_replace:"/<br[^>]*>/iS":" "}</span> {else} <span style="color: orange; font-size: 12px; font-weight: bold;">{$lng.lbl_product_out_of_stock|regex_replace:"/<br[^>]*>/iS":" "}</span> {/if} </td> </tr>


In skin1/customer/mainproducts.tpl this was added

Code:
{if $products[product].stock_indicator ge 1} <span style="color: green; font-size: 12px; font-weight: bold;">{$lng.lbl_product_in_stock_now}</span> {else} <span style="color: orange; font-size: 12px; font-weight: bold;">{$lng.lbl_product_out_of_stock}</span> {/if} </td>



Don't ask me where to place the code as mine would be different from yours as our products layout is different. You would also need to create lanuage variables
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote