Jump to content

HELP - Viewed Products


Recommended Posts

Hi all,

I have 3 problems with my viewed products module, hope someone can help me to solve them:

1. It does not show prices correctly
2. Add to cart does not work
3. It shows the last picture instead of the default picture of the product

Thanks in advance!
www.ecyclog.com

23134_cOFbpfoBfEyUwExdyaY8_t

Link to comment
Share on other sites

Changes line 84 in modules/blockviewed/blockviewed.php in Prestashop v1.3 RC3 from:

AND cl.id_lang = '.intval($params['cookie']->id_lang)



to:

AND cl.id_lang = '.intval($params['cookie']->id_lang).'
AND i.cover = 1'



To add the price, you'll need to modify the SQL query on line 76 from:

SELECT i.id_image, p.id_product, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite



to:

SELECT i.id_image, p.id_product, p.price, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite



then add the following after line 107:

$obj->price = $productsImagesArray[$productViewed]['price'];

Link to comment
Share on other sites

Thanks rocky!
But I got an error message after the edit:
"Parse error: syntax error, unexpected T_STRING in /hermes/bosweb/web297/b2972/ipg.ecyclogcom/ecyclog/modules/blockviewed/blockviewed.php on line 90"
Any idea?
Thanks again!

Link to comment
Share on other sites

  • 1 month later...

Hi,

I tryed to find in the forum some information about a question on viewed product, but nothing!.

I would like understand if is possible after logout canc all viewed products from relative block.

Thanks

Nicola

Link to comment
Share on other sites

  • 1 year later...

Changes line 84 in modules/blockviewed/blockviewed.php in Prestashop v1.3 RC3 from:

AND cl.id_lang = '.intval($params['cookie']->id_lang)

to:

AND cl.id_lang = '.intval($params['cookie']->id_lang).'
AND i.cover = 1'

To add the price, you'll need to modify the SQL query on line 76 from:

SELECT i.id_image, p.id_product, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite

to:

SELECT i.id_image, p.id_product, p.price, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite

then add the following after line 107:

$obj->price = $productsImagesArray[$productViewed]['price'];

thank you.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 5 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...