joelene
Total Posts: 6
Joined: 2008-12-01
I am unable to get images to show up in my recently viewed items list - is this correct? If not can someone tell me how I can:
a) get a nice link back to the viewed item?
b) find the template that creates the recently viewed items (I am editing reports/product_viewed.phtml but it doesn’t look like it contains all the information)
Thanks!
Posted: December 2 2008
| top
joelene
Total Posts: 6
Joined: 2008-12-01
Sorry to bump this but I am under quite a tight deadline and would really appreciate some advice with this
Posted: December 3 2008
| top
| # 1
5live
Total Posts: 28
Joined: 2007-09-01
try this....
< img class= "product-image" src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" />
Posted: December 28 2008
| top
| # 2
loeffel
Total Posts: 412
Joined: 2009-02-03
5live - 28 December 2008 05:25 AM
try this....
< img class= "product-image" src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" />
Thank you!
Signature
Erotikshop
Posted: December 3 2009
| top
| # 4
Germán W
Total Posts: 22
Joined: 2010-02-19
And if you want the icons and product name, as in the “My Cart” sidebar, the code should look like this:
< div class= "block-content" > < ol id = "recently-viewed-items" class= "mini-products-list" > <?php foreach ( $_products as $_item ): ?> < li class= "item" > < a href = "<?php echo $this->getProductUrl($_item) ?>" class= "product-image" >< img src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" /> </ a > < div class= "product-details" >< p class= "product-name" >< a href = "<?php echo $this->getProductUrl($_item) ?>" > <?php echo $this -> htmlEscape ( $_item -> getName ()) ?> </ a ></ p ></ div > </ li > <?php endforeach; ?> </ ol > < script type = "text/javascript" > decorateList ( 'recently-viewed-items' ); </script> </ div >
This should be edited in template/reports/product_viewed.phtml
Posted: March 18 2010
| top
| # 5
slight53
Total Posts: 15
Joined: 2009-09-13
Basel, Switzerland
Thanks Germán W. It works!
Signature
» Are you “Ready to Race”?
Posted: June 13 2010
| top
| # 6
medlington2
Total Posts: 61
Joined: 2011-02-04
Hi,
Can any of you tell me how I would go about adding the price under the product image in the recently viewed products, I had a look through \\\’product/view.phtml\\\’ as I thought the code might be in there but I cant see anything relating to the price.
While Im on the subject, does anyone know how I can add an extra bit of information thats \\\’how much you save\\\’?
I can probably figure this bit out though if I can just get the price and special price to show as I can just read them both into variables and take one from the other, its just getting those 2 vars to show thats the main issue.
Thanks
Signature
Website design and development Sheffield, specialising in Magento - Portable Football Goals - Short Term Car Leasing - Yoga Sheffield - Womens Fashion In Chester
Posted: February 9 2011
| top
| # 9
immaterial thought
Total Posts: 5
Joined: 2008-01-31
The code to include price is in related products
< li class= "item" > < div class= "product" > < a href = "<?php echo $_item->getProductUrl() ?>" title = "<?php echo $this->htmlEscape($_item->getName()) ?>" class= "product-image" >< img src = "<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" /></ a > < div class= "product-details" > < p class= "product-name" >< a href = "<?php echo $_item->getProductUrl() ?>" > <?php echo $this -> htmlEscape ( $_item -> getName ()) ?> </ a ></ p > <?php echo $this -> getPriceHtml ( $_item , true ) ?> </ div > </ div > </ li >
We have images and price displaying on the recently viewed, but price does not display for grouped products if anyone has a fix for that problem I would like to hear about it.
Thanks
Posted: February 21 2011
| top
| # 10
pauline
Total Posts: 6
Joined: 2010-06-19
Germán W - 17 March 2010 10:32 PM
And if you want the icons and product name, as in the “My Cart” sidebar, the code should look like this:
< div class= "block-content" > < ol id = "recently-viewed-items" class= "mini-products-list" > <?php foreach ( $_products as $_item ): ?> < li class= "item" > < a href = "<?php echo $this->getProductUrl($_item) ?>" class= "product-image" >< img src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" /> </ a > < div class= "product-details" >< p class= "product-name" >< a href = "<?php echo $this->getProductUrl($_item) ?>" > <?php echo $this -> htmlEscape ( $_item -> getName ()) ?> </ a ></ p ></ div > </ li > <?php endforeach; ?> </ ol > < script type = "text/javascript" > decorateList ( 'recently-viewed-items' ); </script> </ div >
This should be edited in template/reports/product_viewed.phtml
Thanks so much, worked like a dream! Magento can be so difficult without help like this - really appreciate it.
Signature
Pauline Moon
Herts Premium Websites
yvanacker
Total Posts: 2
Joined: 2011-09-07
5live - 28 December 2008 05:25 AM
try this....
< img class= "product-image" src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" />
It works! Thanks
Posted: February 2 2012
| top
| # 13
Boatmagic
Total Posts: 91
Joined: 2010-08-14
pauline - 14 April 2011 03:44 AM
Germán W - 17 March 2010 10:32 PM
And if you want the icons and product name, as in the “My Cart” sidebar, the code should look like this:
< div class= "block-content" > < ol id = "recently-viewed-items" class= "mini-products-list" > <?php foreach ( $_products as $_item ): ?> < li class= "item" > < a href = "<?php echo $this->getProductUrl($_item) ?>" class= "product-image" >< img src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" /> </ a > < div class= "product-details" >< p class= "product-name" >< a href = "<?php echo $this->getProductUrl($_item) ?>" > <?php echo $this -> htmlEscape ( $_item -> getName ()) ?> </ a ></ p ></ div > </ li > <?php endforeach; ?> </ ol > < script type = "text/javascript" > decorateList ( 'recently-viewed-items' ); </script> </ div >
This should be edited in template/reports/product_viewed.phtml
Thanks so much, worked like a dream! Magento can be so difficult without help like this - really appreciate it.
I tired this code in 1.7.0.2 and it effectively removed the entire right sidebar?
Signature
NEXCESS.NET Web Hosting
Posted: February 2 2013
| top
| # 14
dbcndbcn
Total Posts: 16
Joined: 2012-09-11
Boatmagic - 02 February 2013 02:41 PM
pauline - 14 April 2011 03:44 AM
Germán W - 17 March 2010 10:32 PM
And if you want the icons and product name, as in the “My Cart” sidebar, the code should look like this:
< div class= "block-content" > < ol id = "recently-viewed-items" class= "mini-products-list" > <?php foreach ( $_products as $_item ): ?> < li class= "item" > < a href = "<?php echo $this->getProductUrl($_item) ?>" class= "product-image" >< img src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" /> </ a > < div class= "product-details" >< p class= "product-name" >< a href = "<?php echo $this->getProductUrl($_item) ?>" > <?php echo $this -> htmlEscape ( $_item -> getName ()) ?> </ a ></ p ></ div > </ li > <?php endforeach; ?> </ ol > < script type = "text/javascript" > decorateList ( 'recently-viewed-items' ); </script> </ div >
This should be edited in template/reports/product_viewed.phtml
Thanks so much, worked like a dream! Magento can be so difficult without help like this - really appreciate it.
I tired this code in 1.7.0.2 and it effectively removed the entire right sidebar?
die komplette product-viewed.phtml für Magento 1.7. mit thumbnails //Datei auch im Anhang
?> <?php if ( $_products = $this -> getRecentlyViewedProducts ()): ?> < div class= "block block-list block-viewed" > < div class= "block-title" > < strong >< span > <?php echo $this -> __ ( 'Recently Viewed Products' ) ?> </ span ></ strong > </ div > < div class= "block-content" > < ol id = "recently-viewed-items" > <?php foreach ( $_products as $_item ): ?> < li class= "item" > < p class= "product-name" >< a href = "<?php echo $this->getProductUrl($_item) ?>" > <?php echo $this -> helper ( 'catalog/output' )-> productAttribute ( $_item , $_item -> getName () , 'name' ) ?> </ a > < img class= "product-image" src = "<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width = "50" height = "50" alt = "<?php echo $this->htmlEscape($_item->getName()) ?>" /> </ p > </ li > <?php endforeach; ?> </ ol > < script type = "text/javascript" > decorateList ( 'recently-viewed-items' ); </script> </ div > </ div > <?php endif; ?>
arbeitet perfekt siehe http://dorotheabecker-eco-designer.com/
File Attachments
Posted: February 14 2013
| top
| # 15