Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefilling a credit card results in the address section becoming active. #380

Closed
jeking928 opened this issue Aug 14, 2023 · 4 comments
Closed

Comments

@jeking928
Copy link

Zen Cart 1.5.8a
OPC 2.4.6beta3

When using Edge and using the browser pre-fill option to pre-fill the credit card fields, after the credit card fields are filled, the address section become active. My client says the Update button does not work, only the cancel. In my testing, both Cancel and Update are functional.

I can understand the pre-fill is trying to fill the address, it's part of the pre-fill settings. I don't know much about how the pre-fill works. Is there a way to prevent it from trying to prefill the address fields (without preventing it when actually trying to pre-fill the address fields)?

As reported here:
https://www.zen-cart.com/showthread.php?220781-One-Page-Checkout-Support-Thread&p=1396310#post1396310

@lat9
Copy link
Owner

lat9 commented Aug 14, 2023

Thanks, James. Hopefully, I'll get a chance to investigate soon.

@jeking928
Copy link
Author

I tested in Chrome and did not experience the same issue.

@jeking928
Copy link
Author

I have a developer I work with regularly who came up with this fix for this issue. It's worked in my testing so thought I'd share it.

includes/modules/pages/checkout_one/jquery.checkout_one.js

In the changeBillingFields function, add a conditional check of:

if ( jQuery('#address-form-bill').is(':visible') ) {
// Existing function code here
}

In the changeShippingFields function, add a conditional check of:

if ( jQuery('#address-form-ship').is(':visible') ) {
// Existing function code here
}

@lat9
Copy link
Owner

lat9 commented Aug 17, 2023

Thanks, @jeking928; I'll give that a whirl!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants