Adding custom input fields and leveraging data

nickbaxter
Visitor
3 0 0

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:

  • Recipient name
  • Recipient email
  • Personal message

 

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! 

Replies 5 (5)

diego_ezfy
Shopify Partner
2935 562 883

@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

◦ Follow my blog & youtube for coding tutorials. Most questions in here are already answered there!
◦ Top #4 Shopify Expert, 24h reply. Click here to hire me.
Download copy/paste code snippets that can replace most apps.

nickbaxter
Visitor
3 0 0

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!

DevsIT
Shopify Expert
72 2 9
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>
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on ce.shahabuddin@gmail.com regarding any help
Certified Shopify Expert | Skype : engr-shahabuddin | Whatsapp: +8801722574364
nickbaxter
Visitor
3 0 0

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.

DevsIT
Shopify Expert
72 2 9

Hi @nickbaxter, Do you want to store these values in order page?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on ce.shahabuddin@gmail.com regarding any help
Certified Shopify Expert | Skype : engr-shahabuddin | Whatsapp: +8801722574364