Display points in the order history view

Note: These steps are only required for Magento 1.3.x.x. This integration is automatically achieved for Magento versions 1.4.x.x+ and MageRewards 1.3.2. For older versions of MageRewards with Magento 1.4.x.x+ this integration is unavailable.

What does this block do?

This provides a summary of one of the customer's previous orders and the rewards he or she has earned and spent with that order.

How do I integrate this block manually?

1. Open /design/frontend/ [your package]/[your theme]/template/sales/order/items.phtml

2. Copy this code:

<?php /*MageRewards CODE BEGIN*/ ?>
<?php echo $this->getChildHtml('order_points') ?>
<?php /*MageRewards CODE END*/ ?>
	

3. Look for line 76 and place the copied code in lines 83-85 as shown here: 

<?php if ($_order->getShippingAmount() || $_order->getShippingDescription()): ?>
    <tr>
        <td colspan="<?php echo $colspan; ?>" class="a-right"><?php echo $this->__('Shipping & Handling') ?></td>
        <td class="last a-right"><?php echo $_order->formatPrice($_order->getShippingAmount()) ?></td>
    </tr>
<?php endif; ?>
<?php /*MageRewards CODE BEGIN*/ ?>
<?php echo $this->getChildHtml('order_points') ?>
<?php /*MageRewards CODE END*/ ?>
<tr>
    <td colspan="<?php echo $colspan; ?>" class="a-right"><?php echo $this->__('Grand Total') ?></td>
    <td class="last a-right"><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></td>
</tr>
How do I add this to the Order Print Page?
	

How do I add this to the Order Print Page?

This includes the same information in the printable version of the customer's order summary.

1. Open /design/frontend/ [your package]/[your theme]/template/sales/order/print.phtml

2. Copy this code:

<?php /*MageRewards CODE BEGIN*/ ?>
<?php echo $this->getChildHtml('order_points') ?>
<?php /*MageRewards CODE END*/ ?>
	

3. Look for line 86 and place the copied code in lines 91-93 as shown here: 

<?php endif; ?>
<?php if ($_order->getTaxAmount() > 0): ?>
    <?php echo $this->getChildHtml('tax'); ?>
<?php endif; ?>
<?php /*MageRewards CODE BEGIN*/ ?>
<?php echo $this->getChildHtml('order_points') ?>
<?php /*MageRewards CODE END*/ ?>
<?php if (!$_order->getIsVirtual() && ($_order->getShippingAmount()*1 || $_order->getShippingDescription())): ?>
    <tr>
        <td colspan="<?php echo $colspan; ?>" class="a-right"><?php echo $this->__('Shipping & Handling') ?></td>
        <td class="last a-right"><?php echo $_order->formatPrice($_order->getShippingAmount()) ?></td>
    </tr>
<?php endif; ?>
	

Still need help? Get Help Get Help