Adding date of birth to the cart

Adding date of birth to the cart

discconnection
Tourist
4 0 4

Hi all,

 

I'd like to add date of birth to the cart to capture this information for birthday marketing. 

I've been told I may need to edit some code to add this in? Could someone please assist?

What code and where?

Any help is much appreciated.

Replies 4 (4)

AnneLuo
Shopify Partner
923 172 195

Step1: look for the cart.liquid file under Sections or Templates. The file location might vary depending on your theme. Sometimes, it could be named cart-template.liquid or similar.

Step2: Find the place in the code where the cart form starts, usually within a <form> tag.

Step3: Add the following code to include a Date of Birth field:

<div class="cart__birthday">
    <label for="birthday">Date of Birth:</label>
    <input type="date" name="properties[birthday]" id="birthday">
</div>

 
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me   

Buy Me A Coffee

discconnection
Tourist
4 0 4

Thankyou for your reply. I cant seem to find what page is correct. I've tried updated a few of them with cart.liquid, Cart-template.liquid or Ajax-cart.liquid. Nothing seems to modify it when I add that code in.

Can you assist in inspecting this page?

https://www.discconnection.com.au/cart

AnneLuo
Shopify Partner
923 172 195

I can't find it. I can try to help you add this feature. So I need to access your store as a collaborator if possible. 

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me   

Buy Me A Coffee

discconnection
Tourist
4 0 4

Sure, how do we go about doing that?