2

I have a super weird issue. MY shipping just started giving an error out of the blue, I'm not sure if this is a result of updating to magento 1.8 whcih could have configured some files that I edited previously.

Anyways basically whats happening is everything works fine up to the Shipping section of the checkout point, if I use developer tools and remove the dispaly :none css code on the next section I can acess this and all works ok, it just seems to be getting stuck at the shipping - I cant see any errors on cpanel logs or anything.

What could be wrong ?

I've used google developer tools - pressed SHIFT+CTRL+J to open the console and getting these errors

enter image description here

3
  • 1
    Are there any JavaScript errors in the JavaScript console. When you click to goto the next step, an Ajax call is made to push data, and the move onto the next section. Have a look at that Ajax call, and what the response was. Possible the response gotten back is not valid due to an error in the code run on the call.
    – ProxiBlue
    Oct 8, 2013 at 22:36
  • I've never checked this before - I'm still new to implementing javascript and ajax. Can you possbily explain the steps I can go through for this ?
    – Donovan
    Oct 9, 2013 at 5:00
  • Download google developer tools for the javascript console and press ctrl+shift+j
    – Donovan
    Oct 9, 2013 at 6:42

1 Answer 1

4

From comments of OP, this explains how to debug the checkout steps.

Browse to your checkout. Hit 'f12' which will open the chrome developer tools. At the top, click the 'console' icon.

Perform your action(s) and see if any error sre reported in the console. If so, deal with them. they will be js errors, so nothing strange there.

To see what the responses are on actions: Hit the 'network' icon in the developers tools. Then at the bottom of that panel, click ' 'XHR' filter option. This will only then show you the ajax requests sent, and filter out the noise.

Do your action, and you will see the ajax call request logged in the netwrok tab Now you can click on any of the requests to view detailed info. Click on the 'response' tab to see the html returned.

If your ajax actions caused any php errors, they will (should) be there, or an error response if the ajax call handled them correctly

enter image description here

if this does not lead to your solution, you will need to use the 'sources' tab to do some breakpoints and debug the checkout javascript.

Will stop there, as you may not need go that far. :)

EDIT: Debug on live site on OP request (I had some time to kill to help a fellow South African out ;) )

You seem to have created customization to the OPC payment methods file located here in a base magento install: design/frontend/base/default/template/checkout/onepage/payment/methods.phtml

The file starts with this code (normally)

<dl class="sp-methods" id="checkout-payment-method-load">

and that is missing from your checkout OPC display rendering.

In the opcheckout.js file the following line of code tries to update the checkout payment methods, via the ajax result gotten.

if (response.update_section) {
            $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
        }

response.update_section.name is populated with 'payment-method'

Thus the code is trying to update the element with the id of

checkout-payment-method-load

but since it does not exist, bails.

Your html display:

enter image description here

what it should look like

enter image description here

Best to get your developer to look what was updated in your site since this broke.

5
  • LOL thanks man - I wont lie a lot of this goes straight over my head. However followed your instructions and I see the command that I feel is having an issue . ShippingMethod.Save() (Thats the html when I inspect the element) the ajax seems to say saveShippingMethod - prototype.js:1530 using hte POST method. then if I click it, it indicates something with the payment method (I presume this is right since the next step is payment) I changed my payment option and it still does this.
    – Donovan
    Oct 9, 2013 at 7:37
  • to add top this if I inspect the next element it indicates opc--payment where the shipping ajax commands says goto next section "payment" could this be the problem ? If so why are the other sections working . Perhaps you can look at teh site for me and see what you spot - I might be missing something really basic. lightco.co.za
    – Donovan
    Oct 9, 2013 at 7:39
  • South African site :) I hail from Durbs btw :)
    – ProxiBlue
    Oct 9, 2013 at 8:40
  • What a small world :) Cool well I hope you like the site mate - spent a lot of time making this thing look good. I've enabled another one page checkout module SwiftCheckout - let me know if you didnt get a chance to look for the error message - I will enable another store front for you to browse. Appreciate all your help
    – Donovan
    Oct 9, 2013 at 8:49
  • See the update in the answer above.
    – ProxiBlue
    Oct 9, 2013 at 9:10

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