Skip to content

Commit

Permalink
[bug-OpenMage#160] Mage_Catalog_Helper_Product::getThumbnailUrl() is …
Browse files Browse the repository at this point in the history
…not implemented
  • Loading branch information
sreichel authored and edannenberg committed Mar 20, 2018
1 parent eadb5c4 commit 3abaa31
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions app/code/core/Mage/Catalog/Helper/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public function getFinalPrice($product)
/**
* Retrieve base image url
*
* @param Mage_Catalog_Model_Product $product
* @return string
*/
public function getImageUrl($product)
Expand All @@ -131,7 +132,8 @@ public function getImageUrl($product)
/**
* Retrieve small image url
*
* @return unknown
* @param Mage_Catalog_Model_Product $product
* @return string
*/
public function getSmallImageUrl($product)
{
Expand All @@ -148,11 +150,19 @@ public function getSmallImageUrl($product)
/**
* Retrieve thumbnail image url
*
* @return unknown
* @param Mage_Catalog_Model_Product $product
* @return string
*/
public function getThumbnailUrl($product)
{
return '';
$url = false;
if (!$product->getThumbnail()) {
$url = Mage::getDesign()->getSkinUrl('images/no_image.jpg');
}
elseif ($attribute = $product->getResource()->getAttribute('thumbnail')) {
$url = $attribute->getFrontend()->getUrl($product);
}
return $url;
}

public function getEmailToFriendUrl($product)
Expand Down

0 comments on commit 3abaa31

Please sign in to comment.