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

Weired data behavior of recommended sales price
 
biglaker
Member
 
Total Posts:  31
Joined:  2008-10-23
 

I created an attribute “recommended sales price” (rec_price) to show it right beside the regular price in the form:

Recommended Price: 100 €
Our Price: 90 €

I integrated the attribute in the price.phtml (app/design/frontend/default/default/template/catalog/product/). Everything was fine on first view.

In the detailed product view the price shows like:

Recommended Price: 100 €
Our Price: 90 €

Also in the bestseller list on my home page (bestseller extension from connect community) which is similar to the category page style the price shows correct like:

Recommended Price: 100 €
Our Price: 90 €

But, when checking the category page (list view in my case) AND the upselling/crosselling boxes in diffeent places the price shows like:

Recommended Price: 0 €
Our Price: 90 €

Why the recommended price ist zero here? Is anybody out there who has a guess? Every hint is highly appreciated.

Some code from price.phtml:

<?php $_rec_price = $this->getProduct()->getData('rec_price') ?>
...
(old price class to strike it through)
<p class="old-price">
<span class="price-label"><?php echo $this->__('Recommended Price:') ?></span>
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo
Mage::helper('core')->currency($_rec_price) ?></span>
</p>

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