Jump to content

SQL Code to Reset Price Shown on Category page?


Recommended Posts

I had someone doing data entry for me that was copy and pasting a product over and over again to make new products.  However, the original product had combinations attached to it that were not applicable to the existing product.

 

I went into myphpadmin found the combinations table and deleted the combinations and I thought all was fine.  I now notice that the categories page displays a 0.00 price, but the actual product page displays the correct price.

 

If I go into each product, add 1 combination and then delete it, it works fine and restore the price to the category page.  

 

I have about 400 items and was hoping there was a SQL statement I could run to reset it.

 

Thanks

 

Link to comment
Share on other sites

If it helps anyone... after a few hours of digging I located this query to identify my products that had 0.00 in the category page

 

SELECT id_product, id_category_default, cache_default_attribute
FROM `ps_product_shop`
where not id_product in (select id_product from ps_product_attribute)
and cache_default_attribute > 0
 
 
I then set the cache_default_attribute = 0 for those affected products and everything displayed as expected.
Link to comment
Share on other sites

×
×
  • Create New...