0

i followed this tutorial

http://www.excellencemagentoblog.com/magento-onestep-checkout-remove-payment-method-step

to try to skip the payment method step in the one page checkout. But after searching a lot what the error could be i can not get past the shipping method step and go to the review page.

Can somebody please have a look or tell me how to debug this? this is the installation http://www.agfbelgie.be/newmagento/index.php/checkout/onepage/ i made a user test@test.com with password test123.

Help is really appreciated.

1

When saving the shipping method, the response is not in JSON format.

test{"goto_section":"review","update_section":{"name":"review","html":"<div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/meigeetheme\/default\/template\/checkout\/onepage\/review\/info.phtml\">frontend\/meigeetheme\/default\/template\/checkout\/onepage\/review\/info.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Checkout_Block_Onepage_Review_Info\">Mage_Checkout_Block_Onepage_Review_Info<\/div><div id=\"checkout-review-table-wrapper\">\n    <table class=\"data-table\" id=\"checkout-review-table\">\n                <col \/>\n        <col width=\"1\" \/>\n        <col width=\"1\" \/>\n        <col width=\"1\" \/>\n                <thead>\n            <tr>\n                <th rowspan=\"1\">Productnaam<\/th>\n                <th colspan=\"1\" class=\"a-center\">Prijs<\/th>\n                <th rowspan=\"1\" class=\"a-center\">Aantal<\/th>\n                <th colspan=\"1\" class=\"a-center\">Subtotaal<\/th>\n            <\/tr>\n                    <\/thead>\n        <div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/base\/default\/template\/checkout\/onepage\/review\/totals.phtml\">frontend\/base\/default\/template\/checkout\/onepage\/review\/totals.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Checkout_Block_Cart_Totals\">Mage_Checkout_Block_Cart_Totals<\/div><tfoot>\n        <div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/base\/default\/template\/tax\/checkout\/subtotal.phtml\">frontend\/base\/default\/template\/tax\/checkout\/subtotal.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Tax_Block_Checkout_Subtotal\">Mage_Tax_Block_Checkout_Subtotal<\/div><tr>\n    <td style=\"\" class=\"a-right\" colspan=\"3\">\n        Subtotaal    <\/td>\n    <td style=\"\" class=\"a-right\">\n        <span class=\"price\">\u20ac\u00a01,00<\/span>    <\/td>\n<\/tr>\n<\/div><div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/base\/default\/template\/tax\/checkout\/shipping.phtml\">frontend\/base\/default\/template\/tax\/checkout\/shipping.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Tax_Block_Checkout_Shipping\">Mage_Tax_Block_Checkout_Shipping<\/div><tr>\n    <td style=\"\" class=\"a-right\" colspan=\"3\">\n        Verzending en afhandeling (Flat Rate - Fixed)    <\/td>\n    <td style=\"\" class=\"a-right\">\n        <span class=\"price\">\u20ac\u00a00,00<\/span>    <\/td>\n<\/tr>\n<\/div>    <div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/base\/default\/template\/tax\/checkout\/grandtotal.phtml\">frontend\/base\/default\/template\/tax\/checkout\/grandtotal.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Tax_Block_Checkout_Grandtotal\">Mage_Tax_Block_Checkout_Grandtotal<\/div><tr>\n    <td style=\"\" class=\"a-right\" colspan=\"3\">\n        <strong>Eindtotaal<\/strong>\n    <\/td>\n    <td style=\"\" class=\"a-right\">\n        <strong><span class=\"price\">\u20ac\u00a01,00<\/span><\/strong>\n    <\/td>\n<\/tr>\n<\/div>    <\/tfoot>\n<\/div>        <tbody>\n                    <div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/meigeetheme\/default\/template\/checkout\/onepage\/review\/item.phtml\">frontend\/meigeetheme\/default\/template\/checkout\/onepage\/review\/item.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Checkout_Block_Cart_Item_Renderer\">Mage_Checkout_Block_Cart_Item_Renderer<\/div><tr>\n    <td><span class=\"cart-label\">Productnaam<\/span><h3 class=\"product-name\">Aardappel Agata<\/h3>\n                    <\/td>\n        <td class=\"a-right\">\n        <span class=\"cart-label\">Prijs<\/span>\n                    <span class=\"cart-price\">\n        \n                            <span class=\"price\">\u20ac\u00a01,00<\/span>            \n        <\/span>\n\n\n            <\/td>\n            <td class=\"a-center\"><span class=\"cart-label\">Aantal<\/span>1<\/td>\n        <td class=\"a-right\">\n        <span class=\"cart-label\">Subtotaal<\/span>\n                    <span class=\"cart-price\">\n        \n                            <span class=\"price\">\u20ac\u00a01,00<\/span>            \n        <\/span>\n            <\/td>\n        <\/tr>\n<\/div>                <\/tbody>\n    <\/table>\n<\/div>\n<script type=\"text\/javascript\">\n\/\/<![CDATA[\n    decorateTable('checkout-review-table');\n    truncateOptions();\n\/\/]]>\n<\/script>\n<div id=\"checkout-review-submit\">\n    <div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/base\/default\/template\/checkout\/onepage\/agreements.phtml\">frontend\/base\/default\/template\/checkout\/onepage\/agreements.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Checkout_Block_Agreements\">Mage_Checkout_Block_Agreements<\/div>\n<\/div>    <div class=\"buttons-set\" id=\"review-buttons-container\">\n        <p class=\"f-left\">Iets vergeten? <a href=\"http:\/\/www.agfbelgie.be\/newmagento\/index.php\/checkout\/cart\/\">Ga terug naar uw winkelwagen<\/a><\/p>\n        <div style=\"position:relative; border:1px dotted red; margin:6px 2px; padding:18px 2px 2px 2px; zoom:1;\">\n<div style=\"position:absolute; left:0; top:0; padding:2px 5px; background:red; color:white; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\"\nonmouseout=\"this.style.zIndex='998'\" title=\"frontend\/meigeetheme\/default\/template\/checkout\/onepage\/review\/button.phtml\">frontend\/meigeetheme\/default\/template\/checkout\/onepage\/review\/button.phtml<\/div><div style=\"position:absolute; right:0; top:0; padding:2px 5px; background:red; color:blue; font:normal 11px Arial;\ntext-align:left !important; z-index:998;\" onmouseover=\"this.style.zIndex='999'\" onmouseout=\"this.style.zIndex='998'\"\ntitle=\"Mage_Core_Block_Template\">Mage_Core_Block_Template<\/div><button type=\"submit\" title=\"Plaats bestelling\" class=\"button btn-checkout\" onclick=\"review.save();\"><span><span>Plaats bestelling<\/span><\/span><\/button><\/div>        <span class=\"please-wait\" id=\"review-please-wait\" style=\"display:none;\">\n            <img src=\"http:\/\/www.agfbelgie.be\/newmagento\/skin\/frontend\/meigeetheme\/default\/images\/opc-ajax-loader.gif\" alt=\"Bezig met verzenden van bestelgegevens\" title=\"Bezig met verzenden van bestelgegevens\" class=\"v-middle\" \/> Bezig met verzenden van bestelgegevens        <\/span>\n    <\/div>\n    <script type=\"text\/javascript\">\n    \/\/<![CDATA[\n        review = new ExcellenceReview('http:\/\/www.agfbelgie.be\/newmagento\/index.php\/checkout\/onepage\/saveOrder\/', 'http:\/\/www.agfbelgie.be\/newmagento\/index.php\/checkout\/onepage\/success\/', $('checkout-agreements'));\n    \/\/]]>\n    <\/script>\n<\/div>\n<\/div>"}}

there is a 'test' text appearing in front of the JSON resposne. Check your code for something like echo 'test'.

[EDIT] for order not submitting
Most probably the order is not submitted because you are missing the form key for your order form.
Previous to 1.8 the review js object was built like this:

review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));

Starting 1.8 the review is built like this:

review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements')); 

I see that you are using an extension for the checkout called Excelence...something.
The review js object is built like

review = new ExcelenceReview('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));

or something similar. Look for this piece of code in your template files and replace

<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>

with

<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>

[Second degree edit]
I can now confirm that the issue is what I described in the edit above. If I run in the firebug console this

review = new ExcellenceReview('http://www.agfbelgie.be/newmagento/index.php/checkout/onepage/saveOrder/form_key/8arGYSpcd7M7kVGr/', 'http://www.agfbelgie.be/newmagento/index.php/checkout/onepage/success/', $('checkout-agreements'))

right before placing the order everything runs smoothly. 8arGYSpcd7M7kVGr is the form key for my current session. You should see an order in your backed from user test@test.com. That should serve as confirmation that what I'm saying is true.

  • i can now go to the review step, but submitting the order fails? do you have any idea? – jonas vermeulen Jan 14 '14 at 17:23
  • @jonasvermeulen. See my updated answer – Marius Jan 15 '14 at 9:10
  • @jonasvermeulen. HI i am using the ultimo theme and i am using 1.8 can you please tell me how can i sip the payment method in that – Rohit Goel Apr 13 '14 at 6:30
0

In case that there is only one payment method available, which requires no input, this task can be easier.

In Layout XML do:

<checkout_onepage_paymentmethod>
    <block type="core/template" name="your_module_payment_dummy" output="toHtml">
        <action method="setTemplate">
            <template>your_module/checkout/onepage/payment/dummy.phtml</template>
        </action>
    </block>
</checkout_onepage_paymentmethod>

This Template contains:

<script type="text/javascript">
    //<![CDATA[
    payment.save();
    //]]>
</script>

which automatically saves the pre-selected payment method.

The payment steps can then be hidden by CSS:

#opc-payment,
#payment-progress-opcheckout {display: none;}

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.