Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there,
I want to add two new custom fields to my cart page.
I've followed the instructions here . I did not have the cart-template.liquid or cart-template.liquid in the Spotlight theme and instead added the code to sections/main-cart-items.liquid.
<p class="cart-attribute__field">
<label for="unitdepartment">Unit/Department</label>
<input required class="required" id="unitdepartment" type="text" name="attributes[Unit/Department]" value="{{ cart.attributes["Unit/Department"] }}">
</p>
<p class="cart-attribute__field">
<label for="budgetcode">Budget Code</label>
<input required class="required" id="budgetcode" type="text" name="attributes[Budget Code]" value="{{ cart.attributes["Budget Code"] }}">
</p>
I am getting a validation error:
"you can only add this item in increments of"
Any ideas how I can fix this?
Same issue in the Dawn and Craft themes.
If it is relevant - I have disabled all payment types. I am using this system only for orders and inventory and no payment. However I want to show prices, and track quantity and allow checkout - with these two additional custom fields.
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