Liquid, JavaScript, themes, sales channels
Hi,
For some background, I'm not a technical person, but I understand a bit of front end, however I'm useless at back end.
I am building some customisation onto my gift card product page to display the following fields:
The idea behind this being that the gift card itself will actually get sent to the email address entered into this field, as opposed to being sent to the customer.
Firstly, I just want to understand that this is relatively straight forward. I imagine it's just a case of creating some variables and rerouting the gift card email to get sent to the recipient isntead of the customer.
The second thing I'm curious about is how I can manage this data for reporting. Since these fields are custom, I'm curious as to the best way of how to keep track of all this data like recipient names and emails. Is it easier to link my Shopify store to Google Sheets, or would it be easier to pay a developer to build a private app for reporting?
Thanks in advance!
@nickbaxter
I believe that you are after line item properties. You can find more information about it here and a tool to assist creating them here.
It's worth mentioning that you can't charge money for any line item properties (e.g. "add a gift package for $1+ ?). You can only request additional data.
If you'd like to charge extra for the additional options you'd need metafields and, therefore, either code your own private app or install an existing public one.
Kind regards,
Diego
Hey mate,
Thanks so much for the reply! Really appreciate the links you sent. I will do some reading and figure out the next steps.
Thanks again!
Add in cart.liquid
-------------------------------------
{% unless line_item.properties == empty %}
<ul>
{% for property in line_item.properties %}
<li>{{ property.first }}: {{ property.last }}</li>
{% endfor %}
</ul>
{% endunless %}
Add in product.liquid into form section-
<p class="line-item-property__field">
<label for="recipient-name">Recipient name</label>
<input required class="required" id="recipient-name" type="text" name="properties[Recipient name]">
</p>
<p class="line-item-property__field">
<label for="recipient-email">Recipient email</label>
<input required class="required" id="recipient-email" type="text" name="properties[Recipient email]">
</p>
<p class="line-item-property__field">
<label for="personal-message">Personal message</label>
<textarea required class="required" id="personal-message" name="properties[Personal message]"></textarea>
</p>
Thanks for sending that through. The part I'm trying to come to terms with is managing the back end, which I've since learned would probably require a custom app and 3rd party hosting to store and manage all this data.
Hi @nickbaxter, Do you want to store these values in order page?
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