Jump to content
anson.c

Viewed Products price display

Recommended Posts

Somebody please help to solve it:
The price display on my viewed products module is not working :(
www.ecyclog.com

Thanks!

Share this post


Link to post
Share on other sites

[OFF TOPIC] What module you are using for displaying number of peoples watching a product and for adding a product to the cart. Thanks!

Share this post


Link to post
Share on other sites

Products > Product tooltips v1.0
I think it comes with the Prestashop v1.2 and 1.3

Share this post


Link to post
Share on other sites

How did you fixed New Products & Top Sellers block ?
I am guessing it it same problem.

Share this post


Link to post
Share on other sites

Now I only have two things left to fix:

1. Prices for Viewed Products.
2. Get rid of the extra space underneath the Top Seller title. It won't show on FireFox but IE... kind of weird.

22289_V70e6PRwDubwZnTRRKou_t

Share this post


Link to post
Share on other sites

No.1 fixed... only need to fix the second one, back to the topic! :)

Share this post


Link to post
Share on other sites

What should I edit/add to show the price in the Viewed Products Block ?
I tried {$viewedProduct->getPrice} but useless.

Thanks

Share this post


Link to post
Share on other sites

Thank you very much!
I will try to remember where I left off from 5 months ago, and then try your function there. LOL

Share this post


Link to post
Share on other sites

Try this: {convertPrice price=$viewedProduct->price} ;)

I have 0.00 instead of prices.

How to change?

Share this post


Link to post
Share on other sites

hi, in the qry add:

p.price

 

ex:

$productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
  SELECT i.id_image, p.price, p.id_product, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite
  FROM '._DB_PREFIX_.'product p
  LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product)
  LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
  LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image)
  LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = p.id_category_default)
  WHERE p.id_product IN ('.$productIds.')
  AND pl.id_lang = '.(int)($params['cookie']->id_lang).'
  AND cl.id_lang = '.(int)($params['cookie']->id_lang)
  );

 

and add in the $obj:

 

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

 

now:

attention at tax and discount ;-)

  • Like 1

Share this post


Link to post
Share on other sites

hi, in the qry add:

p.price

 

ex:

$productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
  SELECT i.id_image, p.price, p.id_product, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite
  FROM '._DB_PREFIX_.'product p
  LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product)
  LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
  LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image)
  LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = p.id_category_default)
  WHERE p.id_product IN ('.$productIds.')
  AND pl.id_lang = '.(int)($params['cookie']->id_lang).'
  AND cl.id_lang = '.(int)($params['cookie']->id_lang)
  );

 

and add in the $obj:

 

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

 

now:

attention at tax and discount ;-)

 

Work's great, but how to display Price with reduction?

Share this post


Link to post
Share on other sites

See this function to display price with taxes:

$obj->price = Product::getPriceStatic($obj->id, true, NULL, 2);

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More