Mailing List Archive

[interchange] Prevent browser autocomplete problems
commit f8c6b3ed25d65491e759ab9601061067f38ee1c8
Author: Josh Lavin <digory@cpan.org>
Date: Mon Nov 21 16:41:53 2016 -0800

Prevent browser autocomplete problems

- It seems some browsers (Chrome and possibly others) will insert the
credit card expiration month from autofill into the quantity input
box, instead of the CC month.
- This causes the item's quantity to be set to "06" or whatever the CC
expiry month was in autofill, causing all-around customer confusion!
- See:
http://stackoverflow.com/questions/39937170/prevent-chrome-from-autofilling-creditcard-info
- To fix, we use an invalid value of autocomplete="nope" to prevent
browsers from trying to autocomplete here, which some do even when
autocomplete="off"
- With this, Chrome properly inserts the autofill into the CC month
field.
- It's possible we could name our CC fields differently, per:
https://developers.google.com/web/updates/2015/06/checkout-faster-with-autofill
but at the moment, this fixes it.

dist/strap/include/checkout/shopping_cart | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/dist/strap/include/checkout/shopping_cart b/dist/strap/include/checkout/shopping_cart
index 5ba827e..4abfabb 100644
--- a/dist/strap/include/checkout/shopping_cart
+++ b/dist/strap/include/checkout/shopping_cart
@@ -42,7 +42,7 @@
[/if-item-field]
</td>
<td>
- <input type="[if config FractionalItems]text[else]number[/else][/if]" name="[item-quantity-name]" value="[item-quantity]" class="form-control">
+ <input type="[if config FractionalItems]text[else]number[/else][/if]" name="[item-quantity-name]" value="[item-quantity]" class="form-control" autocomplete="nope">
</td>
<td style="text-align:right">
[item-discount-price]

_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs