0

我一直在尝试修复我的网站,但似乎无济于事 - 我将 Magento 从 1.6 更新到 1.7,现在我遇到了 OnePageCheckout 扩展的问题。

当我进入运输详细信息页面并单击立即下订单按钮时​​,JavaScript 控制台返回此错误:

Uncaught TypeError: Cannot read property 'save' of undefined 

按钮操作当前是:

checkout.save(); return false;

用于此的 HTML+JavaScript 是:

    <div id="checkout-review-submit">    
            <div class="buttons-set" id="review-buttons-container">
    <button type="submit" title="Place Order Now" class="button btn-checkout" onclick="checkout.save(); return false;">Place Order Now</button>
        <span id="review-please-wait" style="display:none;float:right;">
            <img src="http://odilynch.com/skin/frontend/em0028/default/images/opc-ajax-loader.gif" alt="Submitting order information..." title="Submitting order information..." class="v-middle" /> Submitting order information...            </span>
    </div>
</div>
</div>
</div>
<input type='submit' id='opc_submit_form' style='visibility:hidden;' />
</div>
</form>

<script type="text/javascript">
//<![CDATA[
var checkout = new OPC('onepagecheckout_orderform', {
    save    : 'http://odilynch.com/index.php/onepagecheckout/index/saveOrder/',
    update  : 'http://odilynch.com/index.php/onepagecheckout/index/updateCheckout/',
    success : 'http://odilynch.com/index.php/onepagecheckout/index/success/',
    failure : 'http://odilynch.com/index.php/checkout/cart/',
    persistent : ''
}, "Please agree to all the terms and conditions.");


document.observe("dom:loaded", function() {
    var win_triggers    = Array();
    $$('.checkout-agreements .agree a').each(function(item){
        var obj = {
            el: $$('.' + item.className),
            event: 'click',
            window: $(item.className + '-window')
        };
        win_triggers.push(obj);
    });
    opc_window  = new OPC.Window({triggers: win_triggers});
});
//]]>
</script>
4

0 回答 0