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.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityThere 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)
}
);
},