0

I'm trying to find the jQuery of the place order button in the onepagecheckout page.

Does anybody know how I can edit the jQuery functionality of the place order button? Please give me a suggestion.

1 Answer 1

2

There is no jQuery for the place order. Magento 1 uses prototype by default.
The js called by the button is declared in checkout/onepage/revi8ew/button.phtml and it is review.save(). the code executed is in skin/frontend/{package}/{theme}/js/opcheckout.js.
Look for the Review.prototype = { line and below that you will find the save function.

save: function(){
    if (checkout.loadWaiting!=false) return;
    checkout.setLoadWaiting('review');
    var params = Form.serialize(payment.form);
    if (this.agreementsForm) {
        params += '&'+Form.serialize(this.agreementsForm);
    }
    params.save = true;
    var request = new Ajax.Request(
        this.saveUrl,
        {
            method:'post',
            parameters:params,
            onComplete: this.onComplete,
            onSuccess: this.onSave,
            onFailure: checkout.ajaxFailure.bind(checkout)
        }
    );
},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.