lundi 13 avril 2015

Two forms in Billing Information in Magento Checkout not working

Suppose in my Magento checkout page billing section there is two forms (uses the same actual form twice, but values are different).


enter image description here


User can visible one form at a time depending upon the radio button selection. When click continue button the billing information will save. For first form it is working, but when click second continue button the data of first form become saved. That is for both cases the second form is not recognized.


So when I check the second radio button I disable the first form using this code



for(var i=0; i<document.forms[1].length;i++) {
document.forms[1].elements[i].disabled = true;
}


The form become disabled and when I click the continue button alerts Invalid data.


Since the forms are same(same id and contain same elements, but different values) I disabled one form(I think the save function automatically take the enabled form).


But the save function takes only the first form. So I can't save the second option.


In continue button there is a billing.save() function in onclick.I think Using this function the billing address is saved.


So how can I make this working..Please help me...


Please give me any suggestion, or any solution..


My magento version is 1.9.0.1


Aucun commentaire:

Enregistrer un commentaire