snco Posted April 2, 2010 Share Posted April 2, 2010 Hello All,I need some help here…I want to display the product price for each viewed product in the ‘Viewed products’ block.This is my site: http://stepcare.eu/shopIf you look at the viewed products block you can see there is already price showing, but it is the special product price, because I copied some lines of code from the ‘specials block’.I can’t figure it out how to display the final product price tax included, not the special price as it is at the moment.Please, give some help!Alex Link to comment Share on other sites More sharing options...
Clowerweb Posted August 16, 2010 Share Posted August 16, 2010 Here you go:{convertPrice price=$viewedProduct->price} Link to comment Share on other sites More sharing options...
snco Posted August 23, 2010 Author Share Posted August 23, 2010 Thank you. I will try this piece of code....Alex Link to comment Share on other sites More sharing options...
Rneo Posted February 8, 2012 Share Posted February 8, 2012 no tax display price Link to comment Share on other sites More sharing options...
ivankaa Posted July 14, 2012 Share Posted July 14, 2012 (edited) Hello, does anybody know how to display price with tax in blockviewed module? I didn´t find a solution yet. Thanks. Edited May 24, 2013 by ivankaa (see edit history) Link to comment Share on other sites More sharing options...
liutauras4x4 Posted May 23, 2013 Share Posted May 23, 2013 Hello, i am using 1.5.3.1 and standart blockviewd module. It is done in this way. Added blockviewed.php around line 138: $product_properties = Product::getProductProperties($params['cookie']->id_lang,array('id_product' => $obj->id),null); $obj->price = $product_properties['price']; $obj->price_without_reduction = $product_properties['price_without_reduction']; $obj->specific_prices = $product_properties['specific_prices']; $obj->static_token = Tools::getToken(false); Also in blockviewed.tpl in theme folder: <p> {convertPrice price=$viewedProduct->price}</p> {if $viewedProduct->specific_prices AND $viewedProduct->specific_prices.reduction_type == 'percentage'} <p> {convertPrice price=$viewedProduct->price_without_reduction}</p> <p> -{$viewedProduct->specific_prices.reduction*100}% </p> 2 Link to comment Share on other sites More sharing options...
vekia Posted May 23, 2013 Share Posted May 23, 2013 Hello, i am using 1.5.3.1 and standart blockviewd module. It is done in this way. Added blockviewed.php around line 138: $product_properties = Product::getProductProperties($params['cookie']->id_lang,array('id_product' => $obj->id),null); $obj->price = $product_properties['price']; $obj->price_without_reduction = $product_properties['price_without_reduction']; $obj->specific_prices = $product_properties['specific_prices']; $obj->static_token = Tools::getToken(false); Also in blockviewed.tpl in theme folder: <p> {convertPrice price=$viewedProduct->price}</p> {if $viewedProduct->specific_prices AND $viewedProduct->specific_prices.reduction_type == 'percentage'} <p> {convertPrice price=$viewedProduct->price_without_reduction}</p> <p> -{$viewedProduct->specific_prices.reduction*100}% </p> it works fine, thanks for your solution i checked it in my demo store and it works well Link to comment Share on other sites More sharing options...
mouse1 Posted August 31, 2013 Share Posted August 31, 2013 Thank you liutauras4x4 for the code. It helped big time! It didn't work for me fully for some reason (images of viewed products appeared in viewed block, but disappeared from blocknewproducts and from product list), so I adjusted the code a bit... 1) I opened modules/blockviewed/blockviewed.php and found this code: $obj->category_rewrite = $productsImagesArray[$productViewed]['category_rewrite']; 2) After that code I added this: $product_properties = Product::getProductProperties($params['cookie']->id_lang,array('id_product' => $obj->cover),null); $obj->price = $product_properties['price']; 3) I opened themes/default/modules/blockviewed/blockviewed.tpl and added the following code (I placed it at the very end before the last "</li>" ) : <div class="viewprice"> <div> {convertPrice price=$viewedProduct->price}</div> </div> Now all images display correctly in all parts of my shop + I have the final price in my viewed block (I mean price after reduction which I wanted). If you also want to include original price and discount in %, use the second code posted by liutauras4x4, I tried it and it worked. Hope this helps someone. ;-) PS: I'm using Prestashop 1.5.4.0. Link to comment Share on other sites More sharing options...
realayumi Posted November 12, 2014 Share Posted November 12, 2014 (edited) My solution is different. Maybe it helps. My PS version 1.6.0.9 this thread: here Edited November 12, 2014 by realayumi (see edit history) 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