Magento Onepage Checkout 缺少一个步骤

发布于 2024-09-18 05:35:22 字数 1257 浏览 6 评论 0原文

我们有一个即将完工的 magento 商店,但它出现了一个恼人的问题。

在一页结帐时,其中一个步骤丢失了!尽管“运输”选项卡存在于 Mage_Checkout_Block_Onepage->getSteps() 方法内的值数组中,但不会显示。我们已经尝试了一切来找出问题所在,但由于某种原因,它只是拒绝显示,并且没有出现在 HTML 中 - 所以我确信这是服务器端问题,而不是缺少 ID页面问题,或者 javascript 问题。

class Mage_Checkout_Block_Onepage extends Mage_Checkout_Block_Onepage_Abstract
{
    public function getSteps()
    {
        $steps = array();

        if (!$this->isCustomerLoggedIn()) {
            $steps['login'] = $this->getCheckout()->getStepData('login');
        }

        $stepCodes = array('billing', 'shipping', 'shipping_method', 'payment', 'review');

        foreach ($stepCodes as $step) {
            $steps[$step] = $this->getCheckout()->getStepData($step);
        }
        return $steps;
    }
// etc etc
}

(来自 /app/code/core/Mage/Checkout/Block/Onepage.php)

代码根本没有自定义,除了皮肤和本地内部的一些非常轻的自定义代码..这让我们有点疯狂!有什么想法吗?直到最近它一直在工作..我们尝试通过新的magento设置重新安装我们的代码,但仍然..e

:完成“帐单信息”选项卡时页面上有一个javascript错误,但似乎是因为 Magento 没有正确加载代码。错误是:

Error: $("shipping:same_as_billing") is null

基本上该 ID 不存在于页面中,这与正在发生的情况相符。

ee:表单元素不存在。与没有这个问题的旧版本项目相比(不幸的是,几周的开发也没有......=),这个输入被加载到不显示/加载......或任何东西的选项卡内。

eee:我对此仍然有疑问。

we've got an almost-finished-ready-to-go magento shop, that has developed an annoying problem.

On the one page checkout, one of the steps has gone missing! The "shipping" tab, despite being present in the array of values inside the Mage_Checkout_Block_Onepage->getSteps() method, doesn't display. We've tried everything to figure out what is wrong, but for some reason, it just refuses to show, and isn't present in the HTML - so I'm certain that it's a server-side issue, rather than missing IDs in the page, or a javascript issue.

class Mage_Checkout_Block_Onepage extends Mage_Checkout_Block_Onepage_Abstract
{
    public function getSteps()
    {
        $steps = array();

        if (!$this->isCustomerLoggedIn()) {
            $steps['login'] = $this->getCheckout()->getStepData('login');
        }

        $stepCodes = array('billing', 'shipping', 'shipping_method', 'payment', 'review');

        foreach ($stepCodes as $step) {
            $steps[$step] = $this->getCheckout()->getStepData($step);
        }
        return $steps;
    }
// etc etc
}

(from /app/code/core/Mage/Checkout/Block/Onepage.php)

The code isn't customised at all, beyond a skin and some very light custom code inside local.. and it's driving us a little bit crazy! Any ideas? It was working up until recently.. We've tried a reinstall of our code over a fresh magento setup, but still..

e: there is a javascript error on the page when completing the "Billing Information" tab, but seems to be because Magento isn't loading the code correctly. The error is:

Error: $("shipping:same_as_billing") is null

Basically that the ID isn't there in the page, which coincides with what's happening.

ee: The form element does not exist. Comparing to an older version of the project which doesn't have this problem (nor the few weeks development sadly... =), this input is loaded inside the tab which doesn't display / load.. or anything.

eee: I'm still having an issue with this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心头的小情儿 2024-09-25 05:35:22

我要检查的第一件事是 Magento 设置为捕获运输信息(我似乎记得一些配置选项将其关闭),并且您添加到购物车的项目是正常项目(不可下载/虚拟项目) ,不应捕获运输信息)。


根据您的编辑,它正在寻找一个不存在的表单字段(似乎是允许用户选择是否输入单独的帐单地址的复选框)。您能否确认此表单输入存在并通过表单发送?

The first thing I'd check is that Magento is set to capture shipping information (I seem to remember some configuration option to turn it off), and that the items you've added to the cart are normal items (not downloadable/virtual items, which shouldn't capture shipping information).


Based on your edit, it's looking for a form field which doesn't exist (seems to be the checkbox that lets a user choose whether to enter a separate billing address). Can you confirm that this form input exists and is sent w/ the form?

谁把谁当真 2024-09-25 05:35:22

结果发现是布局的问题。回到原来的主题使得步骤出现了。由于不了解更多关于 magento 如何工作的信息,我无法提供更多细节,但希望这对某人有帮助。

It turned out to be a problem with the layout. Going back to the original theme made the steps appear. Without knowing more about how magento works, I can't give any more detail, but hopefully this helps someone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文