onepage checkout停留在计费上,而不是移动到下一步

top*_*log 1 php jquery checkout magento magento-1.7

从3天开始就从这个问题中苦苦挣扎.

当我在Windows(WAMP)中测试应用程序时,一切正常.但是当我在Linux中部署相同时,Billing继续按钮不起作用.

当我在输入细节后点击"继续"时,我在萤火虫中看到了

http://www.domain.com/checkout/onepage/saveBilling/ 200好的

它停留在同一页面......

然后,当我在apache error_log中检查时,我发送错误消息:

[错误]文件不存在:/ home/docs/public_html/checkout,referer:http://www.domain.com/checkout/onepage/

我不知道为什么要去/ home/docs/public_html/checkout ???

我是否正确调试?你能帮我解决一下这个问题....感谢和问候ecomse

Ole*_*nko 5

在结算地址步骤中单击"继续"时,页面会向该页面发送ajax发布请求Mage_Checkout_OnepageController::saveBillingAction.此函数应该将表单数据保存到引号中并返回包含属性"goto_section"的JSON对象,即"goto_section":"shipping_method".ajax请求的成功函数选择此属性并显示下一步.

我建议你使用firebug调试器来检查是否POST /checkout/onepage/saveBilling返回带有goto_section元素的有效JSON对象.如果不是 - saveBilling函数肯定有问题.使用Xdebug并在该函数的开头设置断点,以检查是否所有内容都已正确处理.

另一个可能的问题来源是第三方扩展重写结账路由配置.你店里有可能的嫌疑人吗?尝试停用它们并测试是否能解决问题.

saveBilling操作返回的有效JSON字符串的示例:

{"goto_section":"shipping_method","update_section":{"name":"shipping-method","html":"    <dl class=\"sp-methods\">\r\n                <dt>Flat Rate<\/dt>\r\n        <dd>\r\n            <ul>\r\n                                            <li>\r\n                                                                   <span class=\"no-display\"><input name=\"shipping_method\" type=\"radio\" value=\"flatrate_flatrate\" id=\"s_method_flatrate_flatrate\" checked=\"checked\" \/><\/span>\r\n                                                <label for=\"s_method_flatrate_flatrate\">Fixed                                                                        <span class=\"price\">$5.00<\/span>                                                <\/label>\r\n                                   <\/li>\r\n                        <\/ul>\r\n        <\/dd>\r\n        <\/dl>\r\n<script type=\"text\/javascript\">\r\n\/\/<![CDATA[\r\n            var shippingCodePrice = {'flatrate_flatrate':5};\r\n    \r\n    $$('input[type=\"radio\"][name=\"shipping_method\"]').each(function(el){\r\n        Event.observe(el, 'click', function(){\r\n            if (el.checked == true) {\r\n                var getShippingCode = el.getValue();\r\n                                    var newPrice = shippingCodePrice[getShippingCode];\r\n                    if (!lastPrice) {\r\n                        lastPrice = newPrice;\r\n                        quoteBaseGrandTotal += newPrice;\r\n                    }\r\n                    if (newPrice != lastPrice) {\r\n                        quoteBaseGrandTotal += (newPrice-lastPrice);\r\n                        lastPrice = newPrice;\r\n                    }\r\n                                checkQuoteBaseGrandTotal = quoteBaseGrandTotal;\r\n                return false;\r\n            }\r\n       });\r\n    });\r\n\/\/]]>\r\n<\/script>\r\n"},"allow_sections":["shipping"],"duplicateBillingInfo":"true"}
Run Code Online (Sandbox Code Playgroud)