Magento Forum

   
Small_Image in product_viewed.phtml like Sidebar
 
MJsmart
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2008-02-12
PARIS
 

Hi,

I’d like to put a sticker in the module (reports / product_viewed.phtml)[/ b] products consulted.
As for the module (Ckeckout / cart / sidebar.phtml)[/ b]

Here is the code for Sidebar.phtml

<img src="<?php echo $this->helper('catalog/image')->init($_item->getThumbnailObject(), 'thumbnail')->resize(50, 50)->setWatermarkSize('30x10'); ?>" alt="<?php echo $_item->getProductName() ?>" width="50" height="50" />

How to make it work in product_viewed.phtml:

<div class="content">
        <
ol id="recently-viewed-items">
            
<?php foreach ($_products as $_item): ?>
                
<li>

        <
a href="<?php echo $_item->getProductUrl() ?>">
        
<?php echo $this->htmlEscape($_item->getName()) ?>

        
<img src« ??? Here I would like the sticker RESIZE » >
        </
a>

        </
li>
        
<?php endforeach; ?>
        
</ol>
    </
div>

J’ai essayé ça mais je n’arrive pas a mettre le resize :

<li class="block-compare-item">
        <
a href="<?php echo $_item->getProductUrl() ?>">
        
<?php echo $this->htmlEscape($_item->getName()) ?>
        
<img class="product-image" src="<?php echo $_item->getSmallImageUrl() ?>" width="80" height="77" alt=""/>
        </
a>
        
    </
li>

Thank you!

Bye

 
Magento Community Magento Community
Magento Community
Magento Community
 
kyubii
Jr. Member
 
Total Posts:  20
Joined:  2009-04-16
 

This is what I’m looking for…

the code works like magic ^^

Thanks a lot Jeremy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ggchamp
Sr. Member
 
Total Posts:  153
Joined:  2009-04-30
 

I was looking for this thanks bro!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top