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

Autofill Klarna input fields #5

Open
janoschbatschi opened this issue May 26, 2020 · 4 comments
Open

Autofill Klarna input fields #5

janoschbatschi opened this issue May 26, 2020 · 4 comments

Comments

@janoschbatschi
Copy link

Another feature request would be the autofill functionality if a member is logged-in, so the user doesn't need to enter his data every time.

@janoschbatschi
Copy link
Author

Ok I figured out the problem.

The issue is with following line in KlarnaCheckout.php:
if ($address = Address::findDefaultBillingForMember($this->user->id)) {

  • Find default billing adddress for a member, automatically checking the current store ID and tl_member parent table

The problem is, at least in my case, that the parent table of "tl_iso_address" is "tl_iso_product_collection" for ALL entries. Changing tl_member to tl_iso_product_collection resolved this issue for me. Actually, I plan to use Address::createForMember.

Interestingly, Isotope always refers to tl_member as parent table. Probably that's due to the shop being updated from Contao 3 and the parent table was handled differently?

@richardhj
Copy link
Owner

When a user saves their address to the address book, the ptable will be tl_member. Otherwise, the ptable is tl_iso_product_collection and the address is not "permanent".

I guess we are missing the option "save to address book" in the Klarna checkout. The Isotope checkout, however, can handle this.

@richardhj
Copy link
Owner

We can, however, render a custom checkbox in the Klarna Checkout iFrame.
I can offer the implementation of this feature as paid support. You can contact me via email.

@janoschbatschi
Copy link
Author

Thank you Richard for the offer, but for now, I'm good to go with a non-permanent solution. The createForMember works well for my purpose.

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

No branches or pull requests

2 participants