V2.2.4 Product Tracking Bug? - Should Be Easy Fix?

After many years of running our online store on v2.2.x were are about to add the first products that we do not actually stock for immediate sale. We are doing custom T-shirts that will be made to order. This is in addition to around 2,000 items that we already sell and use inventory tracking for.

Here's a link to one of our new items: http://www.abitofhome.ca/hows-she-cuttin-adult-t-shirt.html

So far, everything is mostly OK except one cosmetic issue that I have not been able to fix. You will notice that under the price for this shirt you see the label “in stock”. I have the inventory setting for this product set to “do not track”. My logic would tell me that this stock label should not display at all if I am not tracking inventory. I can't stop this label from appearing.

I am using the “old style long options” template and I have been focusing my attention around the lines

{assign var=“product_amount” value=“product_amount_$obj_id”}


This is where I figure the in (or out) of stock labels are generated. My thinking was an {if} statement that evaluated the inventory setting and if it was set to “do not track” then the above lines should be skipped over and perhaps a black space inserted in its place.

I have not modified any code for quite some time since the store has been chugging along quite nicely for years so, I am a little rusty. I've been working on this for a couple of weeks and am stumped.

Any kind soul out there care to point me in the right direction? maybe a hint?


Hello there,

I am a little confused about what you want to do actually.. You do not want to have the "add to cart" function, because the product does not exist any more?, or you just want to erase the "in stock" label-text?

if you want to completely erase it (from all the products of your store) you can add this code to your css style file:

span[id^=in_stock_info_] {
display: none;

Otherwise, if you are "Enable inventory tracking" through the Settings -> General -> Catalog(section), there is one more option inside this section "Show out of stock products".

If you enable this checkbox, the products with 0 stock, will show up, but users can not buy these ones...But there is a link says "Add to wishlist" instead of buying...

If you uncheck this value you will will not see these products at all.

Hopes that help!

Try this code:

{if $product.tracking != “D”}
{assign var=“product_amount” value=“product_amount_$obj_id”}

in 4.3.x you can use {if $product.tracking != "ProductTracking::DO_NOT_TRACK"|enum}

in 4.3.x you can use {if $product.tracking != "ProductTracking::DO_NOT_TRACK"|enum}

The question was about 2.x version. This code will not work there

Oh, missed the version.. Right!