Personalized checkout and custom promotions with Shopify Scripts
Hey i am trying to set up to have a text box show on one of 2 variants i have (1 is no customization and 1 is customization) There is an extra charge to have text and even tho it is stated multiple times it is an extra fee people still put stuff in it without selecting the correct option. I have been searching for hours to find a way to do it and no luck. Below is the code i currently have in it to allow. I have seen talk of a callback but cant find the info i need on it. If someone could point me in the right direction it would be appreciated.
<p class="line-item-property__field">
<label for="Add a name"><B>Choose "Customize" option above to add a name</B></label>
<input maxlength="12" id="Add a name" type="text" name="properties[Add a name]"placeholder="ADD NAME HERE +$2.00">
</p>
that code works but like i said people are putting stuff in it without selecting the correct variant. Any help is appreciated
Hook an event listener on the element and callback to an Ajax API call to update the cart.
Did you get this to work for your site? I am currently trying to do the same thing and am having difficulty figuring it out. Some of my variants have engraving options while others do not and I would like the engravable ones to have a text box where they can enter the information and the ones that do not have engraving it should be hidden.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024