Jump to content

incorrect "out of stock" at random items in product list


uintatherium

Recommended Posts

Hello everyone,

 

I am finalizing a prestashop someone else has built. We are running version 1.4.0.17. We are reluctant to upgrade to the latest version, because we have modified .tpl files and we are not quite sure whether upgrading is safe in such a case.

 

Now, to the point. There is a problem with our product list. Some of the products that are in stock appear as out of stock, for no apparent reason. You can see it here http://www.pashmina-...icebarevne-saly , the product in question is called "Jamavar zlatohnědý", or here http://www.pashmina-.../82-check-dabba , where it affects multiple items. The issue is not present in individual product view. It doesn't seem to affect newly added products, either (I just added one to see).

 

I managed to isolate the problem down to the value of the $product.quantity variable in the product-list.tpl file. I've added the following line for debugging:

 

{if (isset($product.quantity))}<p>qty set: {$product.quantity}</p>{else}<p>qty not set</p>{/if}

 

You can still see the output on the respective pages. The problematic products do have the variable set, but nothing is returned, as if the value is FALSE or NULL. (This is in contrast with products that are really out of stock, where the displayed value is "0", as seen in the first example). Here, I'm at a loss, I only suppose it has something to do with the way values are obtained through SQL.

 

I don't think the product-list.tpl was modified before I entered the project.

 

A guy from our team discovered that the issue can be fixed by adding an attribute and a combination to the product, then removing them again. After that, the stock quantity behaves fine.

 

Another member says this issue occurs randomly with different products - allegedly, after all products were manualy fixed using the described workaround, the issue has reoccurred, affecting different products.

 

If this is a wrong section of the forum, please let me know.

 

Any help is highly appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...