Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi
For some time now, the attributes sent to the cart have stopped working. It used to work fine, and I haven't made any changes to the code. My implementation looks like this:
<p class="cart-attribute__field" style="display: none;">
<input class="required" id="inpost-name" type="text" name="attributes[InPost Name]" value="{{ Cart.attributes['InPost Name'] }}">
<input class="required" id="inpost-city" type="text" name="attributes[InPost City]" value="{{ Cart.attributes['InPost City'] }}">
<input class="required" id="inpost-post-code" type="text" name="attributes[InPost Post Code]" value="{{ Cart.attributes['Kod pocztowy InPost'] }}">
<input class="required" id="inpost-street" type="text" name="attributes[InPost Street]" value="{{ Cart.attributes['InPost Street'] }}">
<input class="required" id="inpost-location" type="text" name="attributes[InPost Location]" value="{{ Cart.attributes['InPost Location'] }}">
</p>
After selecting the appropriate options, the attribute field in cart.json is empty. All other JSON properties fill correctly—even the notes, which are selected on the same page.
I'm seeking assistance and information—has anything changed in the way attributes are transmitted to the cart?
Learn how to expand your operations internationally with Shopify Academy’s learning path...
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