三天以来一直在解决这个问题。
当我在 Windows (WAMP) 中测试应用程序时,一切正常。但是当我在 Linux 中部署相同的内容时,计费继续按钮不起作用。
当我输入详细信息后单击“继续”时,我在 firebug 中看到
http://www.domain.com/checkout/onepage/saveBilling/ 200 确定
并且它停留在同一页面......
然后,当我检查 apache error_log 时,我看到以下错误:
[错误] 文件不存在:/home/docs/public_html/checkout,引用地址:http://www.domain.com/checkout/onepage/
我不知道为什么它会去/home/docs/public_html/checkout ???
我的调试方式正确吗?你能帮我解决这个问题吗...... 感谢和问候 生态系统
最佳答案
当在帐单地址步骤中单击“继续”时,页面会向Mage_Checkout_OnepageController::saveBillingAction
发送一个ajax post请求。该函数应该将表单数据保存到报价中,并返回一个包含属性“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"}
关于php - 单页结账停留在账单上,无法进入下一步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14612891/