【发布时间】:2017-07-12 07:35:11
【问题描述】:
我收到错误 TypeError: $(...) is null 并且 TypeError: $(...).visible 为 null。
在单页结帐 jquery 函数中是 if($('checkout-step-shipping').visible() || $('checkout-step-shipping_method').visible())
请告诉我可能导致此问题的原因
function styleRegionInterval() {
if (!intervalInit) {
styleRegion = setInterval(styleRegionInput, 500);
intervalInit = true;
}
}
function styleRegionInput() {
if($('checkout-step-shipping').visible() || $('checkout-step-shipping_method').visible()) {
clearInterval(styleRegion);
intervalInit = false;
shippingRegionUpdater.update();
}
}
几天前我删除了送货方式,但没有它我的结帐工作正常。
结算或注册页面上的结帐以继续按钮与那里的函数调用相同。
【问题讨论】:
-
这是 jQuery 还是 Prototype? (看起来像原型)。
-
Magento1 还是 Magento2?
-
因为我在结帐时跳过了送货方式。我必须删除 checkout-shipping-method.visible() 条件,因为它不是 onepage 的一部分。这解决了我的问题。我的 magento 版本 1.9.1.1
标签: magento magento-1.7 magento-1.9 magento2 magento-1.8