Jump to content

Precios en módulo productos más vistos (blockviewed)


Recommended Posts

Prestashop 1.5.5.0

Tema por defecto convertido a Bootstrap3

http://latiendadelneumatico.com/ (en construcción)

 

Hola, alguien sabría cómo mostrar el precio de cada producto en (blockviewed) productos más vistos?

 

he probado con esto pero no funciona, supongo que será por la diferencia entre versiones...

 

 

Gracias!!

Yo he probado lo del enlace: http://www.prestasho...ost__p__1360143 que comentas tu

 

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.

 

 

en Prestashop 1.5.5 y me ha funcionado.

Link to comment
Share on other sites

Por cierto supongo que has forzado compilación ¿no?

 

 

Recuerda que cuando dice:

 

/themes/default/modules/blockviewed/blockviewed.tpl

 

no quiere decir que tengas que editar esa ruta exacta, sera:

 

/themes/la-plantilla-que-estes-usando/modules/blockviewed/blockviewed.tpl

 

(Sino lo tienes sobreescrito en tu plantilla, tendras que editar el tpl original /modules/blockviewed/blockviewed.tpl o hacer un copia de ese fichero en /themes/tu-plantilla/ creando la estructura de /modules/blockviewed/ dentro de tu plantilla sin miedo)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...