Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Autofilling forms


burt

Recommended Posts

Autofill is a good solution. But the user should have the opportunity to turn off or on.

A lot people do privat browsing.

 

I say 50% yes and 50% No.

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

@@greasemonkey it's standard HTML see https://html.spec.whatwg.org/multipage/forms.html#autofill so all browsers should either support it now or eventually end up supporting it.

 

For the record, I've actually snook (snuck? sneaked?) this in under the radar over a year ago;

https://github.com/gburton/Responsive-osCommerce/commit/61d20906802f49d0d790cf7fca5d5037e7dd55b8#diff-f28b492799f135a35f3d723314a28ec2

It's likely no-one ever noticed ;)

Link to comment
Share on other sites

Seeing as the code changes are quite minor, I see no reason not to add it to core. Saying that I bet when its really looked into there will be a fair few files that will need changing. It may also be something that some other ecommerce software are yet to use, making oscommerce a bit better.

 

It may even make it easier for store owners with address formatting which can be a real pain as some customers never get their own name and address correctly capitalized.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

I agree with @@mcmannehan that we need to be careful about data privacy on this one. It should never use cookie or browser-stored personal data. It is probably OK to pre-fill a form from user-supplied account data. Just be careful about storing credit card data -- you would need to be fully PCI-compliant for that one (including your storage of the CC data in the first place). Other personal data, such as name and address, could be subject to various national standards.

Link to comment
Share on other sites

I agree with @@mcmannehan that we need to be careful about data privacy on this one. It should never use cookie or browser-stored personal data. It is probably OK to pre-fill a form from user-supplied account data. Just be careful about storing credit card data -- you would need to be fully PCI-compliant for that one (including your storage of the CC data in the first place). Other personal data, such as name and address, could be subject to various national standards.

 

Don't get too distracted by mcmannehan's comment ... well meaning but misguided.  This is data that the user saves into their browser (or not).  If it is there...and they start typing into a form, the rest of the form is autocompleted (if they choose to do so).  There is no privacy issue whatsoever...

 

And there is no "storage" on our side.  What the user does in their browser is up to them...

Link to comment
Share on other sites

It may even make it easier for store owners with address formatting which can be a real pain as some customers never get their own name and address correctly capitalized.

 

Yes, this is another good reason, and in fact one that I had not thought about (and probably no "technical" person ever thought about!).  

Assuming that the customer stored their details correctly in their browser, then yes, the form would pre-fill with those correctly capitalized details.

Link to comment
Share on other sites

To answer your question though, I think it's a good idea since it's standard html and browsers should support it. 

 

This is for autocomplete on/off which is slightly less relevant than what I'm doing here; 

 

http://caniuse.com/#feat=input-autocomplete-onoff

 

green = good

greeenish = goodish

 

If autocomplete on/off is pretty much standard across the board, it won't be long until the rest of the autocomplete things are standard across the board.

Link to comment
Share on other sites

Well, some people, for whatever reason, are using shared browsers (internet cafes, libraries, etc.), and can get careless about leaving personal data laying around, ready for someone else to scoop up. I'm just saying that we should be careful about making it too easy for these people to shoot themselves in the foot. Always keep in mind that your application may be used on a public (shared) browser or possibly over an insecure connection, and safeguard private data accordingly.

Link to comment
Share on other sites

Well, some people, for whatever reason, are using shared browsers (internet cafes, libraries, etc.), and can get careless about leaving personal data laying around, ready for someone else to scoop up. I'm just saying that we should be careful about making it too easy for these people to shoot themselves in the foot. Always keep in mind that your application may be used on a public (shared) browser or possibly over an insecure connection, and safeguard private data accordingly.

 

Again...for clarity:  

 

We are not asking people to "save" data.  We are asking to use already saved data.

 

If someone saved their personal data at an Internet Cafe...well, I guess that would be a problem for them, not for us.

Link to comment
Share on other sites

@@burt

 

Anything to make it easier for customers to buy. This week I added autofill credit card fields to a payment module I did.

 

 

I think this is the way forward also.

 

Let's make it as easy as possible for customers to buy stuff. 

Link to comment
Share on other sites

Great addition to the code.  What were your thoughts regarding the optional shipping / billing. 

 

  1. Optionally, a token that is an ASCII case-insensitive match for one of the following strings:

    • "shipping", meaning the field is part of the shipping address or contact information
    • "billing", meaning the field is part of the billing address or contact information
Link to comment
Share on other sites

I was confused what he mean, but yes i assume he talk about multiple addresses to be auto filled.

But that is already covered via their documentation, however i think it is a little unclear written.

The reason why is that they mixing up the examples and explanation. Read with me:

Here they state the following https://developers.google.com/web/updates/2015/06/checkout-faster-with-autofill#address

 

 

For one address input: street-address

For two address inputs: address-line1 , address-line2 address-level1 (state or province) address-level2 (city) postal-code (zip code) country

 

 I'm already confused here.. but it goes on...

So we read first in their doc about addresses, then they go on with phone

https://developers.google.com/web/updates/2015/06/checkout-faster-with-autofill#phone

 

Below the phone they continue about addresses saying...:

 

 

The autocomplete attributes can be accompanied with a section name, such as:

shipping - given-name
billing - street-address
It is recommended because it will make your markup easier to parse and understand. The browser will autofill different sections separately and not as a continuous form.

 

That is kinda funny, saying it is recommended but not give any exact example in how it should be used.

Ok, i admit i see some kind of reference in the address example from the first link, but that only holds shipping, and it does not contain any reference to a secondary address what can be auto filled.

Link to comment
Share on other sites

There is a link to the demo on the page. The shipping and billing refer to a different address for the shipping address and also the billing address. Some people would like the bill sent to one place and the items to another.

 

Forgot to add the link to the demo page

 

https://greenido.github.io/Product-Site-101/form-cc-example.html

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

@@14steve14

 

Yes i missed that example for the addresses, i scrolled immediately to the cc section when i tested.

The confusion i had was with the address-*1 and address-*2 explanations.

Seems not need and just use a attribute value like shipping or billing

autocomplete="billing postal-code"
autocomplete="shipping postal-code"

For me it is clear now (Y)

Link to comment
Share on other sites

Hey gents.  Didn't mean to create confusion.  I understand that this is an optional setting that is not required when dealing with only one address on a page.  Though I can see the benefit of having the section defined for one over the other, however, I understand this to be a personal preference and every store owner would see this differently.

 

My only suggestion would be to specify "billing" and "shipping" depending on the file name within checkout_new_address.php:

 

For example

$autofill_section = (basename($PHP_SELF) == 'checkout_payment_address.php' ? 'billing ' : 'shipping ');

with modification as such to the fields

  . '" autocomplete="' . $autofill_section . 'address-level1"'

This would further allow the browser to populate the data with correct information allowing a better experience for the customer.

 

But then I understand that this may be moving away from keeping it simple.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...