Jump to content

[SOLVED] zero price in search results but ok on product page


Recommended Posts

  • 2 weeks later...

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 by hypermedia (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 8 months later...

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

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 by xapinc (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...

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

  • 10 months later...

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