BUG: Out of Stock Tracking in v2.1.2 CE

Testing out CS-Cart 2.1.2 Community Edition.



Found out all my products show up as ‘out of stock’ in place of the ‘add to cart’ button because I have inventory value of 0. Normally I disable inventory tracking, so it should show the ‘add to cart’ button.





CS-Cart 2.1.2 Community Edition ignores the tracking.



Here’s the fix.



Modify the file ‘product_data.tpl’ under the path ‘customer/common_templates/’.



On line 73,



Change:




	{if !($product.zero_price_action == "R" && $product.price == 0) && !($settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" && ($product_amount <= 0 || $product_amount < $product.min_qty) && $product.is_edp != "Y") || ($product.has_options && !$show_product_options)}<br />

```<br />
<br />
To:<br />
<br />
<br />
```php
	{if !($product.zero_price_action == "R" && $product.price == 0) && !($settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y" && ($product_amount <= 0 || $product_amount < $product.min_qty) && $product.is_edp != "Y" && $product.tracking == "B") || ($product.has_options && !$show_product_options)}<br />

```<br />
<br />
<br />
This should check to see if inventory tracking is disable for the product.