Gabor@ Posted December 5, 2012 Share Posted December 5, 2012 (edited) Hi, I have a strange issue. In the search results i get 0 price for some products but it is ok on the product page. Do you have any idea? Thanks Gabor http://www.urlgone.com/a2da9f/ Edited December 18, 2012 by hypermedia (see edit history) Link to comment Share on other sites More sharing options...
Gabor@ Posted December 5, 2012 Author Share Posted December 5, 2012 (edited) something wrong with the combinations - strange but if I change the default product that solves the issue check this: http://www.prestashop.com/forums/topic/197758-price-0-when-product-have-combinations/ Edited December 14, 2012 by hypermedia (see edit history) Link to comment Share on other sites More sharing options...
Gabor@ Posted December 18, 2012 Author Share Posted December 18, 2012 (edited) I have exported the mysql db before and after the the combination change (it was XXL size, changed to M and changed back to XXL) only cache_default_attribute has changed so I have tried to clear and reset and worked Solution: UPDATE `ps_product` SET `cache_default_attribute` = 0; UPDATE `ps_product_shop` SET `cache_default_attribute` = 0; UPDATE `ps_product` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute` WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1 UPDATE `ps_product_shop` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute` WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1 Edited December 18, 2012 by hypermedia (see edit history) 1 Link to comment Share on other sites More sharing options...
xapinc Posted August 28, 2013 Share Posted August 28, 2013 I have exported the mysql db before and after the the combination change (it was XXL size, changed to M and changed back to XXL) only cache_default_attribute has changed so I have tried to clear and reset and worked Solution: UPDATE `ps_product` SET `cache_default_attribute` = 0; UPDATE `ps_product_shop` SET `cache_default_attribute` = 0; UPDATE `ps_product` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute` WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1 UPDATE `ps_product_shop` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute` WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1 This is cool but can you make it understandable to others?? I'm in MySQL looking at these tables but I don't see how you set these things so ease. Link to comment Share on other sites More sharing options...
xapinc Posted August 28, 2013 Share Posted August 28, 2013 I was able to do it in MySQL, by going to SQL and doing that, but it didn't work for me. Still says $0.00 Link to comment Share on other sites More sharing options...
xapinc Posted August 29, 2013 Share Posted August 29, 2013 (edited) Ok, I found a solution but it doesn't resolve the problem with the combination prices not changing when you switch between products that have different specific prices. on themes/default/product.tpl around line 76 you will find this addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity}); Solution: Remove the apostrophes around {$combination:reference|addslashes} Now the other issue was there with the apostrophes, so I'm looking into a solution for that Edited August 29, 2013 by xapinc (see edit history) Link to comment Share on other sites More sharing options...
cliqadam Posted September 22, 2013 Share Posted September 22, 2013 SOLVED '' All you have to do is go to that products edit page in your admin and change one of the combination defaults than change it back to the one you had before. That's it done , something resets ..... Link to comment Share on other sites More sharing options...
vekia Posted September 22, 2013 Share Posted September 22, 2013 and if someone has got 10000 products? :/ Link to comment Share on other sites More sharing options...
Enrique Gómez Posted August 4, 2015 Share Posted August 4, 2015 I have exported the mysql db before and after the the combination change (it was XXL size, changed to M and changed back to XXL) only cache_default_attribute has changed so I have tried to clear and reset and worked Solution: UPDATE `ps_product` SET `cache_default_attribute` = 0; UPDATE `ps_product_shop` SET `cache_default_attribute` = 0; UPDATE `ps_product` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute` WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1 UPDATE `ps_product_shop` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute` WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1 This stills works on last prestashop 1.6. Thanks!. The corrupted database is due to delete some attributes without deleting the product combinations before Link to comment Share on other sites More sharing options...
patelakshay177 Posted June 21, 2016 Share Posted June 21, 2016 Thanks Enrique Gómez it works Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now