Enable the Browser's Autocomplete in Onepage Checkout Form
-
16-10-2019 - |
문제
How to enable autocomplete for the checkout form? Currently my browser (chrome) does not store any input values...
해결책
We did the following on Magento 1.8.1
changed as described by Inchoo in billing.phtml. Don;t forget to change both in template/checkout/ and template/persistent
form id="co-billing-form" method="post" autocomplete="on" action=""
Updated opcheckout.js
elements[i].setAttribute('autocomplete','on');
This works fine now.
One thing we do see however. If you have some nice CSS set-up that add the checkmarks or other to validated fields is that the autocomplete overwrites this with the infamous yellow background
다른 팁
Our friends over at Inchoo have a nice article on this along with a fix. Basically, you just need to add a method to the form, either post or get.
In template/persistent/checkout/onepage/billing.phtml
add method="post"
in line 28:
<form id="co-billing-form" method="post" action="">
<fieldset>
<ul class="form-list">
Magento disables the automatic filling of some forms.
This is done by calls like elements[i].setAttribute('autocomplete','off');
in opcheckout.js
.
But even uncommenting this call did not make it work.
If you search the code for a RegEx autocomplete.*off
there are many places where autocomplete is disabled.
There are browser plugins to override this - but I guess you want to make the shopping experience better for all customers, without the need to install a plugin ;-)
So there would be some debugging needed - please share your results!