1

I've enabled the COD options in a magento ce 1.9.2.4 store. In the onePage checkout if the user choose the COD option it's still visible in the Order Review a table row telling Your credit card will be charged for and giving the final value in the base currency. For me I want to hide this row ONLY if the user chosen the COD.

is there's a direct option for that? code hints? and to tell I've thought about a simple jquery solution but IDK is it okay to do so or there's a magento recommended solution? This image taken from fresh installation: screenshot from fresh installation

2

You can rewrite Mage_Checkout_Block_Cart_Totals::needDisplayBaseGrandtotal() function to achieve this with below code.

public function needDisplayBaseGrandtotal()
{
    $quote  = $this->getQuote();
    $hideForPayment = 'cashondelivery'; // Your Payment method code for which you want to hide message
    if ($quote->getBaseCurrencyCode() != $quote->getQuoteCurrencyCode() && $quote->getPayment()->getMethod() != $hideForPayment) {
        return true;
    }
    return false;
}
  • thanks so much. it worked perfectly. but should I edit \app\code\core\Mage\Checkout\Block\Cart\Totals.php or overwrite the function elsewhere? – M.Elwan Apr 12 '17 at 11:00
  • 2
    You MUST NOT edit any core Magento file. Better way to do this will be to put the file in your local folder. \app\code\local\Mage\Checkout\Block\Cart\Totals.php – Jaimin Sutariya Apr 12 '17 at 11:03
0

Did your order review reload after you change the payment method ?

Or you can check if there is JavaScript conflict/error from your browser

Updated :

Check this file, if you want to hide the code is up to you.

app\design\frontend\base\default\template\checkout\onepage\review\totals.phtml

or you can try this one :

Hide display base grand total

  • it's in fresh installation too. so it's a magento core thing and not related to any extra as I think – M.Elwan Apr 12 '17 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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