where to remove "Stock: 2 item(s)"

Hi,

Where i can remove the stock count on the product page ?

on each page it say “Stock: XXX item(s)” i want to remove this line.

any idea ?



Regards.

enable customization mode, you should be able to locate the template this way…

[url]http://beta.cs-cart.com/admin.php?dispatch=site_layout.design_mode[/url]

Hello Matto,



Tooooo simple!



In this file:



/customer/cart_pages/[COLOR=“Blue”]product_details.tpl[/COLOR]



Delete this lines:



{$product.amount} {$lang.items}




Think smart!



When you looking for a special thing as yours:



1 - Write down the name (here, it’s [COLOR=“#0000ff”]Stock[/COLOR])



2 - Go to you back-end



3 - Administration > Languages



4 - Search the name in “Search for pattern:” field (here [COLOR=“#0000ff”]Stock[/COLOR])



5 - Write down the CS-Cart variable (here it’s [COLOR=“#0000ff”]in_stock[/COLOR])



6 - Go to your local skins directory (on your own desktop computer).

Usually, it’s /customer directory.



7 - Use a special search tool to find “[COLOR=“Blue”]in_stock[/COLOR]” in “[COLOR=”#0000ff"]*.tpl[/COLOR]" files in [COLOR=“Blue”]/customer[/COLOR] directory.



8 - Press OK (or Search) button.



9 - Open and Edite the file(s)



11 - Save



12 - Refresh your HTML page







That’s all folks!





Lee Li Pop

Ooops!



Sorry, my example is good with 1.3.5…



But skills are same!





Lee Li Pop

hi

skins/basic/customer/views/products/components/buy_now.tpl

line 105

```php {/if}



{hook name=“products:options_advanced”}

{if $product.is_edp !== “Y”}

{if !$simple}


{if $product.amount <= 0 && $product.tracking == "B"}
{$lang.text_out_of_stock}
{else}
{/if}


{else}
{if $product.amount <= 0 && $product.tracking == "B"}
{$lang.text_out_of_stock}
{/if}

{/if}
{/if}
{/hook} ```

work for me

Your advice worked. :smiley:



I found the TPL file here:

/customer/product_pages/product_details.tpl

A variation of this replacing the stock count with an available/unavailable tag can be found at:

[url]http://forum.cs-cart.com/showthread.php?t=11693&highlight=available%2Funavailable[/url]



Regardless of which approach you use, you should consider putting your changes in a hook or be prepared to make the same change each time there is an upgrade. Each of those changes will increase the time to reopen your store as you go resolve conflicts.



Bob