Jump to content

Availability preferences not taken into account


Amalia78

Recommended Posts

Hello,


The site in question uses Prestashop version 8. 


The availability preferences defined in the Quantity or Combinations tab of the product sheet are not taken into account. For example, for a product that is out of stock, the behaviour is "Accept orders". However, on the front page the product appears to be out of stock and cannot be added to the basket. 


In the database, out_of_stock is 2 in ps_product and 1 everywhere in ps_stock_available. It seems that the value taken into account is that of ps_product, which is confirmed on the front when I modify this value in the database.


After searching, it appears that the source of the problem is the following line: return array_merge($row, self::$productPropertiesCache[$cache_key]); (Product.php - public static function getProductProperties)
This line for the product in question overwrites the correct value in $row. This line sees the value of out_of_stock change for the product in question when the value in ps_product is modified. 


This doesn't seem to be the case on a PrestaShop 1.7.8 site, but I can't see where a change needs to be made, unless this issue can be resolved in some other way.


Thanks in advance for your feedback.  

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...