How to Add a Delivery Date Picker to Your Cart Page - Easy Step-By-Step Shopify Tutorial
Many store owners choose to insert a delivery date picker in their cart template to help customers choose their delivery date. This is an effective method of increasing the business sales allowing store owners and their customers to monitor orders placed and their delivery dates.
By choosing a delivery date and enabling tracking orders, customers are kept notified of when their orders are due and when they are fulfilled. On your part as a Shopify store owner, the delivery date can be transferred into CSV format which can be sent to suppliers, delivery services and customers. You can also go on to customize the appearance and options of the delivery date picker.
This article is a step-by-step tutorial on How to insert a delivery date picker to your cart template in Shopify. Follow this guide on how to include a delivery date picker to your Shopify store:
Add a Delivery Date Picker to Your Cart Page
Add a delivery date picker to your cart
You can include a calendar on your cart page that allows customers to specify a delivery date for their order.
This customization will not work for drawer or pop-up cart styles, and will only work for a cart page (at the URL your-store.com/cart). If you use a cart drawer or pop-up, then you will need to change your cart style to Page in the theme editor. Add a product to the cart in the theme preview, and then click the Cart page tab in the theme editor to view your cart settings.
Include jQuery in your theme.liquid
For this customization to work, some themes require that a script tag for jQuery is added to the theme.liquid layout file. If you use Boundless, Debut version 17.2.0 or newer, Express, Narrative, or Venture, then you may need to follow the next step:
- In the Layout directory, click theme.liquid.
-
Find the closing </head> tag in the code. On a new line above the closing </head> tag, paste the following code:
{{ '//ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js' | script_tag }}
- Click Save
Create a delivery date snippet
To create a snippet for your delivery date picker:
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, and then click Actions > Edit code.
- In the Snippets directory, click Add a new snippet:
- Create the snippet:
- Name your snippet delivery-date
- Click Create snippet. The new snippet file will open in the code editor.
- In your new delivery-date.liquid snippet, paste the following code:
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js" defer="defer"></script>
<div style="width:300px; clear:both;">
<p>
<label for="date">Pick a delivery date:</label>
<input id="date" type="text" name="attributes[date]" value="{{ cart.attributes.date }}" />
<span style="display:block" class="instructions"> We do not deliver during the week-end.</span>
</p>
</div>
<script>
window.onload = function() {
if (window.jQuery) {
let $ = window.jQuery;
$(function() {
$("#date").datepicker({
minDate: +1,
maxDate: '+2M',
beforeShowDay: $.datepicker.noWeekends
});
});
}
}
</script>
Include the snippet in your cart page
To include the delivery date snippet in your cart page:
- In the Sections directory, click cart-template.liquid. If your theme doesn't have this file, then click cart.liquid in the Templates directory.
- Find the closing </form> tag in the code. On a new line above the closing </form> tag, paste the following code:
- Click Save.
You now have a delivery date input field on your cart page. When you click inside the text field, a calendar will appear
Add a Delivery Date Picker to Your Cart Page
Once you have completed all of this steps, you can now start tracking your customers delievry dates, sending updates whe needed.
Any questions? Leave a comment or contact us Ecom Experts.
Guides
- How To Create CUSTOM PRODUCT OPTIONS on Shopify 2.0
- How To Open External Links In A New Tab - Easy Shopify Tutorial
- How To Add Before And After Slider To Shopify - Easy 2022 Tutorial
- How To Add a Background Video To Shopify For Free
- How To Embed TikTok Videos To Any Shopify Page For Free
- Create Product Bundles Without The App - 2022 Easy Shopify Tutorial!
- Add Back to Top Button on Shopify Using Code: Detailed Tutorial
- How to Add A Custom Cart Icon on Shopify Using Code: Detailed Tutorial
- How to Add Breadcrumb Navigation to Your Shopify Store: DIY Tutorial Using Code
- How to Add Sales Countdown Timer to Your Shopify Store
- Cumulative Layout Shift Optimization: Causes and How to Measure It
- Ask How Customers Heard About Your Store On The Cart Page - 2022 Shopify Tutorial
- How to create a simple Quick View without app usage to your Shopify store
- Add A Multiple Currency Selector to Your Shopify Store Using Code Tutorial
- How to Create A Page of Collections on Shopify Using Code
- Show The Number of Products Left in Stock on Your Shopify Product Page
- Change the Number of Products in the Collection Page- Shopify Tutorial
- DIY Guide to Embed A YouTube Video in Shopify Product Page Tutorial
- Add a Message to the Shopify Product Pages by Using Product Tags - 2022 Easy Tutorial
- How to Add a Delivery Date Picker to Your Cart Page - Easy Step-By-Step Shopify Tutorial
- How To Create A Stunning Parallax Scrolling Section In Your Shopify Store Tutorial
- 6-step Tutorial on How to Add Wholesale To Shopify Store Without Shopify Plus
- How to Add Banner Image to Product Pages Without The App - Quick Shopify Tutorial
- How to add Hover Effect on Main Navigation Bar In Shopify
- How to Add A Gallery Page to Your Shopify Store without the App
- Disable Right-click to Protect Your Images on Shopify Using Code - Tutorial
- How to Auto Hide Sold Out Products on Shopify: DIY Tutorial
- DIY Code: How To Add Continue Shopping Button To Your Shopify Cart Page
- How to Create Custom Product Options on Shopify Without the App in 2022
- How to Select Variants By Clicking Their Images on Shopify
- How to Create a Custom Note Field on Your Shopify Cart Page
- How to Enable Custom File Upload Product Options on Shopify
- How To Show An Alternate Product Image On Your Shopify - Easy Step-By-Step Tutorial
- Step-by-Step Tutorial to Set Up Facebook Messenger Chat On Shopify Without App
- DIY Code To Add a Size Chart to Shopify Product Pages
- How To Redirect Shopify Customers After Login, Logout & Account Creation
- 4 Steps to Create a Sticky Header on Shopify: DIY Code
- How to Add Featured Product Slider To Your Shopify Store: Step-By-Step Tutorial
- Shopify Product Description Tabs: 5 easy steps to create your own collapsable descriptions
- Shopify Quick ADD TO CART Button On Collection Page Without The App
- How To Add a CUSTOM FONT To Your Shopify Store
1 comment
-
Hi, i saw your video on youtube about adding a shipping estimate for my customers. I started going through this document and there seems to be a code missing from the create a snippet section. Did you realise this?
LEARN MORE
Get ahead with the latest in e-commerce and Shopify Plus

How Headphones.com Mobile Speed Score Went From 21 to 76 In 48 Hours
1 comment
Hi, i saw your video on youtube about adding a shipping estimate for my customers. I started going through this document and there seems to be a code missing from the create a snippet section. Did you realise this?