1

As my site uses EMI options for payment the prices in Order review section should be shown in

Rs.xxx per month

format.

I've made changes to phtml files only [to do this], because it should only be shown like that but price calculations should happen as it is.

Now my problem is, I've used FlyWebdesign_PaypalFee extension to add payment method charges, I need to display the payment method charge in the above mentioned format.

enter image description here

the prices in the image may not be correct, it's just the format I want. I want Payment charge to be shown as 120 per month

I don't know how to do this, can anyone help please?

I know the payment charge is passed like

$address->addTotal(array(
            'code' => $this->getCode(),
            'title' => Mage::helper('sales')->__('Payment Charge'),
            'full_info' => array(),
            'value' => $amount,
            'emi'   => 'per month' // custom line to show per month.
        ));

and i can add an extra element in the array, to fetch it in payment review. But how to appended it to Rs120.00

1 Answer 1

2

I used

            $address->addTotal(array(
            'code' => $this->getCode(),
            'title' => Mage::helper('sales')->__('Payment Charge'),
            'full_info' => array(),
            'value' => $amount,
            'text'  => $appendText // text to be appended
        ));

in app/code/local/FlyWebdesign/PaypalFee/Model/Sales/Quote/Address/Total/Paymentcharge.php fetch() method and

    <td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
    <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
        <?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
        <?php echo $this->getTotal()->getText(); // print text to be appended ?>
    <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
</td>

in app/design/frontend/my_theme/default/template/checkout/total/default.phtml

That does the trick!

1
  • this can be done with 'full_info' parameter, you need to echo $this->getTotal()->getFullInfo(0);
    – Shathish
    Commented Jul 18, 2013 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.