Manually Integrating Points Currency Image

By default, the Points Currency Image is shown below the "You will xxx points" in Product info pages. 

This guides assume that you already set your  Points Currency Image in Magento.

  1.  Open /design/frontend/[your package]/[your theme]/template/catalog/product/view.phtml
  2. Copy this code: 
    <?php /*WDCA CODE BEGINS*/ ?><br><?php echo $this->getChildHtml('points'); ?><br><?php /*WDCA CODE ENDS*/ ?>
    		
  3. Create a new file in your theme i.e points_earned_custom.phtml and save it in  /design/frontend/[your package]/[your theme]/template/rewards/product/view/points_earned_custom.phtml and copy this code 
    <div class="distri_section">
        <?php foreach ($this->getDistriRewards() as $reward_currency => $reward_amount): ?>
            <!-- $reward_currency is almost always '1' and 
             $reward_amount is an integer amount of points to display. -->
            <?php $img_url = $this->getPointsImgUrl($reward_amount, $reward_currency); ?>
            <?php $imgPath = Mage::getModel('rewards/currency')->load($reward_currency)->getImage(); ?>
            <?php if (!empty($imgPath)): ?>
                <img src="<?php echo $img_url; ?>" 
                 class="points_image points_currency_image-<?php echo $reward_currency ?>"/>
            <?php endif; ?>
        <?php endforeach; ?>
    </div><br>
    		
  4. Open app/design/frontend/base/default/layout/rewards.xml. Copy this to your theme  /design/frontend/[your package]/[your theme]/layout/rewards.xml
  5. Comment line 81. 
    <!-- block type="rewards/product_view_points_earned" name="rewards.product.view.points.earned"  as="points_earned" template="rewards/product/view/points_earned.phtml" / -->
    		
  6. Add this code below line 81.
    <block type="rewards/product_view_points_earned" name="rewards.product.view.points.earned"  as="points_earned" template="rewards/product/view/points_earned_custom.phtml" />
    		

Still need help? Get Help Get Help