In this article we are going to talk about a very important problem that we have had to solve in many Prestashop online stores of our clients. The error consists in that the price is not shown or its value is zero (€ 0) in the list of products, and only in the products that have combinations.
However, if the product file is accessed, the price is displayed correctly. Therefore it only occurs in the list of products.
What are the causes of the problem?
Although by the nature of the problem, we do not find it logical, since if the price on the product page is shown correctly, how is it possible that in the list of products, that product does not show the price or is shown with quantity 0? .
Its origin is in an error in the MySQL Database from Prestashop . The affected tables that cause this problem are the table ps_product and ps_product_shop and the column that is causing the problem is cache_default_attribute which is where the ID of the default attribute that each product that carries combinations is configured is stored. This column sometimes stores erroneous or non-existent data of the IDs of the default attributes in the products with combinations, for that reason the problem mentioned in this article is caused.
During the operation of the store, the Database is constantly working performing operations of inserting, deleting, updating and displaying data. During these processes and over time, the Database can deteriorate causing this and other errors. For this reason, we always recommend periodic maintenance of the Database.
Maintenance can be carried out by hiring a company of professionals such as us, or if your website is a Prestashop online store, then you could buy the module specialized in the repair, optimization and maintenance of the Database of Prestashop stores.
In this case we recommend our module Ultimate Database Optimizer .