Hello
We are using the Sufio app to automatically generate invoices for one of our clients. Because we’re in the EU, VAT numbers are required on the invoices so we capture them on the cart page using this tutorial:
https://sufio.com/articles/shopify/taxes/vat-eu-shopify/vat-exempt-eu/cart-page/
Sufio also requires an email address at that point, so we capture that on the cart page as well. I can see in the code provided by Sufio that they add this email address as a parameter to the checkout page so the user doesn’t have to fill it in again. More specifically, this piece of code:
var form = submit_button.parents('form');
form.attr('action', form.attr('action') + '?checkout[email]=' + encodeURIComponent(email));
Unfortunately this parameter is dropped along the way (due to redirects I think), causing the email field in the checkout to be blank.
E.g.:
/56306368685/checkouts/06167925221a5870e5792ef16742822f?checkout%5Bemail%5D=test%40test.com → initial URL after clicking submit button in cart
/56306368685/checkouts/06167925221a5870e5792ef16742822f?checkout%5Bemail%5D=test%40test.com&no_cookies_from_redirect=1 -> first redirect
/56306368685/checkouts/2c5327c69f941f41e407d70868624ce4 → final checkout URL, dropping the email parameter and causing the email field to be empty
Manually appending the parameter to the final URL, autofills the email field.
I have also tried adding the email parameter as a hidden input field on the cart page with name “checkout[email]” (suggestion found through Google). This doesn’t work either unfortunately.
How can we resolve this issue? It’s not very user friendly to have the user enter their email address twice.