Shopify themes, liquid, logos, and UX
I am writing my own code to implement the "add new address form" on my theme.
I followed the docs here, but my form is not adding a new record upon submit.
https://shopify.dev/docs/themes/architecture/templates/customers-addresses#add-a-new-address
Does adding addresses somehow not work on development stores? My edit address form is working, just not my add address form.
Both forms have almost the same code, except the {% form %} tag and the initial values inside each input. Below is an extract of my code
// snippets/address-form.liquid
<div class="address-form-container"> {% liquid if address assign form_arg = address assign address_id = address.id else assign form_arg = customer.new_address assign address_id = 0 endif %} {% form 'customer_address', form_arg %} <label for="country-{{ address_id }}">
<select id="country-{{ address_id }}"></select>
// other code
// ... {% endform %}
resolved: my form was not sending the country parameter.
apparently shopify sends a 302 response even if the form is invalid, and just silently ignores the error
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024