All things Shopify and commerce
I can make it work using checkout permalinks as detailed here:
https://community.shopify.com/c/shopify-design/cart-use-permalinks-to-pre-load-the-cart/td-p/613702
But it doesn't seem possible to do the same by putting in a form input on my cart page such as:
<input type="text" name="checkout[shipping_address][zip]" value="SW17 8AL">
Other inputs for order attributes pass through to the order just fine:
<input type="text" class="datepicker__input" name="attributes[deliveryDate]" id="datepicker__input">
or
<textarea name="attributes[gift-note]" id="GiftNote"></textarea>
I've also tried to do it via the the post URL of my form but this doesn't work either:
<form action="/cart?checkout[shipping_address][zip]=SW178AL" method="post" novalidate class="cart">
I'd prefer not to go via the API (or build up a permalink URL based on what the user inputs into my attribute fields on my cart page), I want to achieve this using pure HTML/javascript. But from what I can see, it isn't possible. Any ideas?
Hey,
I am not sure if that's what you are looking for. This will probably work for Shopify Plus ONLY.
If you have layout/checkout.liquid you can execute js on a checkout page.
I just save checkout form data as cookie and then fill form fields with that.
Unfortunately we're on Advanced Shopify, not on Shopify Plus, otherwise this would be a good solution.
here they say in order to that you'll need to use API
Hi,
Were you able to find a solution?
Thanks
I was. But we are on Shopify Plus
No simple solution was found for Advanced Shopify. I didn't try via the API (I needed to do it using some sort of HTTP POST or deep link, but nothing seemed to work).
Find Global Growth Opportunities For Your Business with Shopify AcademyLearn how to exp...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025