In this article we will talk about a very important problem that we have had to solve in many Prestashop online stores of our customers. The error is that the price is not displayed or its value is zero (0o) in the product listing, and only on products that have combinations.
However, if the item card is accessed, the price is displayed correctly. Therefore it only happens in the product listing.
What are the causes of the problem?
Although because of the nature of the problem, we find no logic, because if the price on the product page is displayed correctly, how is it possible that in the product listing, that product does not show the price or is displayed with quantity 0?.
Its origin is in an error in the Prestashop MySQL Database. The tables affected and that cause this problem are the ps_product table and ps_product_shop and the column that is causing the problem is cache_default_attribute which is where the default attribute ID that each product that carries combinations is configured is stored. This column sometimes stores erroneous or non-existent data from the default attribute IDs in products with combinations, which is why the problem mentioned in this article is caused.
During store operation, the Database is constantly working by performing insert, delete, update, and display data operations. During these processes and over time, the Database may deteriorate causing this and other errors. For that reason, we always recommend periodic maintenance of the Database. Maintenance can be performed by hiring a professional company such as us, or by purchasing a module specialized in the repair, optimization and maintenance of the Database, in this case we recommend our Ultimate Database Optimizer module.