I had custom code for an “estimated delivery date” section that worked perfectly with a previous theme, but now with the 2.0 theme “Dawn”, I can’t get it to work.
I added a “Custom liquid” block to the product template with “{% render ‘estimateddeliverydates’ %}” in it. It shows all of the labels like “Estimated delivery date”, “Standard shipping”, etc., but it does not show any text where the actual dates are supposed to be. Any ideas?
Here’s the snippet titled “estimateddeliverydates”:
{% if settings.dates_show %}
**Estimated delivery date (US orders only)**
*Standard shipping:* -
*Express shipping:* -
{{ '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js' | script_tag }}
{% endif %}
And here’s the section from “settings_schema.json”:
{
"name": "Shipping Times & Holidays",
"settings": [
{
"type": "checkbox",
"id": "dates_show",
"label": "Show Dates",
"default": true
},
{
"type": "text",
"id": "holiday_dates",
"label": "Exclude These Holiday Dates"
},
{
"type": "paragraph",
"content": "Format with (YYYY-MM-DD). Separate with commas ','"
},
{
"type": "checkbox",
"id": "exclude_saturday",
"label": "Exclude Saturday",
"default": false
},
{
"type": "checkbox",
"id": "exclude_sunday",
"label": "Exclude Sunday",
"default": true
},
{
"type": "text",
"id": "standard_ship_days",
"label": "Standard ship days",
"default": "5"
},
{
"type": "text",
"id": "express_ship_days",
"label": "Express ship days",
"default": "3"
},
{
"type": "text",
"id": "ship_range",
"label": "Shipping Range (days)",
"default": "1"
}
]
}