Magento 1.7 - OnePageCheckout Broken

时间:2014-11-06 09:56:10

标签: javascript magento checkout onepage-checkout

我一直在努力修复我的网站,而且我似乎无处可去 - 我将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>

0 个答案:

没有答案