Personalized checkout and custom promotions with Shopify Scripts
Hi all.
I am using the Dawn theme. And on a specific product I have a quantity selector and a text area where a user can list the label names they want based on the quantity they selected (see screenshot below). I would like a way to validate the quantity selected to ensure that it corresponds to the number of listed labels.
I can write a script that can count the number of listed labels in the text area, but I am struggling to find a way to validate it with the count on the quantity selector. The reason for this validation is because we are having challenges where our customers may list "more than" or "fewer than" the label quantity number they specified in the quantity selector. For example, they may choose they want 5 labels, but write only four label names or write 6 label names in the text area.
So I would like the validation to occur when the "Add to Cart" button is clicked to ensure that the labels are only added to cart if the quantities are identical.
Any help will be most appreciated.
Hey 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, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024