Site lana18.ru was moved to new hosting and I set to it a new template. After it at the payment page, where user can chose the payment system, pricing plan and use promocode start working incorectly. And I find that submited form have elements, dobled. I use the code from console:
var myForm = document.getElementById("adminForm");
for (var i = 0; i < myForm.elements.length; i++) {
console.log(i, '.', myForm.elements[i].name, ':',myForm.elements[i].value);
}
and find that few items are dobled:
0 'plan_id[19]' '3' 1 '' '' 2 'plan_selected[19]' '81db6ae158a06949fc61e273014dc0f5' 3 '' '24000' 4 '' '60000' 5 '' '12000' 6 'plan_id[19]' '15' 7 '' '' 8 'plan_selected[19]' '81db6ae158a06949fc61e273014dc0f5' 9 'promocode' 'May2022' 10 'Submit' 'Пересчитать' 11 'processor' 'payanyway' 12 '' '' 13 'continue' 'Продолжить покупки' 14 'checkout' 'Оформить заказ' 15 'option' 'com_guru' 16 'controller' 'guruBuy' 17 'task' 'checkout' 18 'view' 'test' 19 'order_id' '0' 20 'action' '' 21 '' '2' 22 '' '0' 23 '' 'Please log-in first!' 24 '' '9600.00' 25 '' '0'
The elements 0-2 and 6-8 are the same, but the 6-8 are the default values in the form, and the metod “Submit” is not working properly, always the user find, that he have to pay for default values of the form.
At the old site this code have another result:
0 'plan_id[19]' '3' 1 'plan_selected[19]' '811ca521aeaf79afd1782d7f018429d0' 2 '' '24000' 3 '' '60000' 4 '' '12000' 5 'promocode' 'May2022' 6 'Submit' 'Пересчитать' 7 'processor' 'payanyway' 8 'continue' 'Продолжить покупки' 9 'checkout' 'Оформить заказ' 10 'option' 'com_guru' 11 'controller' 'guruBuy' 12 'task' 'checkout' 13 'view' 'test' 14 'order_id' '0' 15 'action' '' 16 '' '2' 17 '' '0' 18 '' 'Please log-in first!' 19 '' '24000.00' 20 '' '0'
I make this hack to changhe form.elements:
I can’t insert the code, only the picture…
And now it working properly. But I sure, it is wrong way. Could anybody tell me the right way?
