1

I am shortening the one page checkout page as my store will not have payment option and shipping selection option. I am following below blog

http://excellencemagentoblog.com/blog/2011/10/17/magento-onestep-checkout-remove-payment-method-step/

Everything works fine till place order after the review section. Upon clicking on the place order button I am getting below error

The requested Payment Method is not available.

My controller section to set payment mode is as below

$quote = Mage::getSingleton('checkout/session')->getQuote();
                        $methodCode = 'free';


                        if ($quote->isVirtual()) {
                            $quote->getBillingAddress()->setPaymentMethod($methodCode);
                        } else {
                            $quote->getShippingAddress()->setPaymentMethod($methodCode);
                        }
                        $quote->save();

And the free shipping mode enabled also.

I referred below question posted before:

The requested Payment Method is not available

It is not solving my issue. No system.lo captured also.

7
  • Could you try free_free as method code? I seem to remember it' should be something like that. Also, try placing an order with all steps enabled and check what the code for payment and shipping is in the sales_flat_order table Sep 5, 2015 at 12:49
  • @SanderMangel I can see shipping method name in sales_flat_order table, cant see payment mode name on that table?
    – Anto S
    Sep 5, 2015 at 13:12
  • 1
    The code is "freeshipping" for free shipping
    – Smartie
    Sep 5, 2015 at 13:39
  • 1
    free payment method is available only when order total is 0, verify that you are fulfilling this condition first.
    – Prateek
    Sep 5, 2015 at 13:41
  • @SanderMangel your trick works, I enabled all the modules and made one transaction. Then I didn't know how to get payment code. So I wrote a code $order = new Mage_Sales_Model_Order(); $order->loadByIncrementId($order_id); $payment_method = $order->getPayment()->getMethodInstance()->getCode(); I found the code and applied. It works fine now.
    – Anto S
    Sep 6, 2015 at 5:47

1 Answer 1

2

Try free_free as method code. I seem to remember it should be something like that.

Also, try placing an order with all steps enabled and check what the code for payment and shipping is in the sales_flat_order table.

Your Answer

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

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