57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
{%- comment -%}
|
|
App embed: loads the widget on every page so it can (1) appear inside the cart drawer,
|
|
(2) adopt waitlist offers from links, and (3) stop checkout clicks when a time is required.
|
|
{%- endcomment -%}
|
|
<script type="application/json" data-datewise-config>
|
|
{
|
|
"drawerSelector": {{ block.settings.drawer_selector | json }},
|
|
"checkoutGuard": {{ block.settings.checkout_guard | json }},
|
|
"locale": {{ request.locale.iso_code | json }},
|
|
"currency": {{ cart.currency.iso_code | json }},
|
|
"text": {
|
|
"choose": {{ 'datewise.choose' | t | json }},
|
|
"needTime": {{ 'datewise.need_time' | t | json }},
|
|
"held": {{ 'datewise.held' | t | json }},
|
|
"expired": {{ 'datewise.expired' | t | json }},
|
|
"left": {{ 'datewise.left' | t | json }},
|
|
"full": {{ 'datewise.full' | t | json }},
|
|
"postal": {{ 'datewise.postal' | t | json }},
|
|
"check": {{ 'datewise.check' | t | json }},
|
|
"waitlist": {{ 'datewise.waitlist' | t | json }},
|
|
"joined": {{ 'datewise.joined' | t | json }},
|
|
"dispatch": {{ 'datewise.dispatch' | t | json }},
|
|
"change": {{ 'datewise.change' | t | json }},
|
|
"prep": {{ 'datewise.prep' | t | json }},
|
|
"free": {{ 'datewise.free' | t | json }},
|
|
"fee": {{ 'datewise.fee' | t | json }},
|
|
"nextAvailable": {{ 'datewise.next_available' | t | json }},
|
|
"offer": {{ 'datewise.offer' | t | json }},
|
|
"error": {{ 'datewise.error' | t | json }}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
{% schema %}
|
|
{
|
|
"name": "Datewise",
|
|
"target": "body",
|
|
"javascript": "datewise.js",
|
|
"stylesheet": "datewise.css",
|
|
"settings": [
|
|
{
|
|
"type": "checkbox",
|
|
"id": "checkout_guard",
|
|
"label": "Ask for a time before checkout",
|
|
"default": true,
|
|
"info": "Stops the checkout button until a time is chosen, when your Datewise settings require one."
|
|
},
|
|
{
|
|
"type": "text",
|
|
"id": "drawer_selector",
|
|
"label": "Cart drawer selector (advanced)",
|
|
"info": "Only if the widget doesn't appear in your cart drawer. CSS selector for the drawer's footer."
|
|
}
|
|
]
|
|
}
|
|
{% endschema %}
|