Remove In Stock for Non Tracked Items

I’m testing CS-Cart and would like to know if there is a way to change the code to make the In Stock quantity appear for tracked inventory but not for non-tracked inventory? I’ve found the code in the appropriate template but I’m not familiar enough with Smarty PHP on my own to determine how to change it to fit the scenario I want.



Thank you.

Stephanie

[QUOTE]make the In Stock quantity appear for tracked inventory but not for non-tracked inventory?[/QUOTE]



I need to do exactly the same thing…



Thanks!

I want to hide the IN STOCK phrase that appear near ADD CART button.



I don’t want people know how many products we have. They only need to know that WE HAVE. Nothing more.



In old version we could choose if we want or not show this. In this new version 2.0.5 I haven’t found it yet.





Thanks!

This is what I did to hide my stock count.



I went to the following template located at public_html/skins/(your template)/customer/views/products/components/buy_now.tpl



The I added some code to comment out my stock from



```php



{$lang.in_stock}:

```



to



```php




```



I don’t like to delete stuff in case I have to add it back. I didn’t take great notes on my changes so please test first. thanks!

… 

in my opinion, the better solution is to implement a new lang variable like text_in_stock with value: “in stock” or “Yes”



and replace in the file mentoined above:



```php {if ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.tracking == “B”}

{$lang.text_out_of_stock}

{else}

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

{/if}

```



to:





```php {if ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.tracking == “B”}

{$lang.text_out_of_stock}

{else}

{$lang.text_in_stock}

{/if} ```

[QUOTE]in my opinion, the better solution is to implement a new lang variable like text_in_stock with value: “in stock” or “Yes” and replace in the file mentoined above:[/QUOTE]



Thanks for this solution Demarchi, much nicer way of displaying the stock status with inventory tracking on & works perfectly in 2.0.10 ! :wink:

worked great but you wouldnt happen to know how to use it with when track with options is selected?

cheers

Scott

[QUOTE]worked great but you wouldnt happen to know how to use it with when track with options is selected?

cheers

Scott[/QUOTE]


```php {************************************ /Discount label ****************************}


{/if}

{if !$simple && $product.is_edp == "Y"}

{$lang.text_edp_product}


{/if}

{hook name="products:options_advanced"}
{if $product.is_edp !== "Y" && $settings.General.inventory_tracking == "Y" && $product.tracking != "D"}
{if !$simple}

{$lang.in_stock}:
{if ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.tracking == "B"}
{$lang.text_out_of_stock}
{else}
{$lang.text_in_stock}
{/if}


{else}

{if ($product.amount <= 0 || $product.amount < $product.min_qty) && $product.tracking == "B"}
{$lang.text_out_of_stock}
{/if} ```

any one can assist me in removing the “This product is electronically distributed” text?

[quote name=‘Lavish’]any one can assist me in removing the “This product is electronically distributed” text?[/QUOTE]

In Content->Languages, search for ‘text_edp_product’ and remove the “value” text; save and then clear the template cache and that message will no longer appear.



Bob

How do you do this on 2.1.4?