Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

getPriceHtml problem - A month on still no solution so reposting HELP!! 
 
grooveyard
Jr. Member
 
Total Posts:  26
Joined:  2009-06-08
 

Hi hopefully you can help

Im trying to show products in the right column using:

<? 
$_productId 
'2';
$_product Mage::getModel('catalog/product')->load($_productId);
?>
<a href="<?php echo $_product->getProductUrl() ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50) ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" width="50" height="50" /></a><br>
<
a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a>
<?php echo $_product->getPriceHtml() 
?>

Everything shows except the prices.

I can change the last line to either

<?php echo $_product->getPrice() ?>
or
<?php echo $_product->getSpecialPrice() ?>

Problem is that this always displays if there is a special price or not.

it just seems that i cant get getPriceHtml to call the prices from the right column.

Any ideas?

Many thanks in advance.
Paul

 
Magento Community Magento Community
Magento Community
Magento Community
 
key
Member
 
Avatar
Total Posts:  59
Joined:  2008-07-16
beijing.china
 

do you know how to show product on homepage? as i know, you just need show product at right column. if the product could show at right column, the price too

 
Magento Community Magento Community
Magento Community
Magento Community
 
grooveyard
Jr. Member
 
Total Posts:  26
Joined:  2009-06-08
 

excellent!
Many thanks that worked.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gaptoothclan
Jr. Member
 
Total Posts:  9
Joined:  2010-06-25
 

Ok so how did you do it?

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