Created
June 6, 2019 16:44
-
-
Save stlk/447b56f0435715199e4bcd70119cee98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/snippets/ajax-cart-template.liquid b/snippets/ajax-cart-template.liquid | |
index 7f820eb..d49ebee 100644 | |
--- a/snippets/ajax-cart-template.liquid | |
+++ b/snippets/ajax-cart-template.liquid | |
@@ -26,14 +26,16 @@ Use the raw liquid tags to keep the handlebar.js template tags as available hook | |
</ul> | |
<div class="cart-bottom"> | |
<div class="buttons-container"> | |
- <a href="/cart" class="minicart-button">{% endraw %}{{ 'cart.general.view_cart' | t }}{% raw %}</a> | |
+ <a href="/cart" class="minicart-button" style="width: 100%;">{% endraw %}{{ 'cart.general.view_cart' | t }}{% raw %}</a> | |
{{#if gwaCheckout}} | |
{% endraw %} | |
<a class="minicart-button" href="{{ shop.url }}/{{ shop.metafields.gwa.app_proxy }}/check.out{% raw %}{{#if customer}}/{{ customer }}{{/if}}{% endraw %}">{{ 'cart.general.checkout' | t }}</a> | |
{% raw %} | |
{{else}} | |
{% endraw %} | |
+ {% comment %} | |
<a href="/checkout" class="minicart-button">{{ 'cart.general.checkout' | t }}</a> | |
+ {% endcomment %} | |
{% raw %} | |
{{/if}} | |
</div> | |
diff --git a/templates/cart.liquid b/templates/cart.liquid | |
index a971762..c2bed2a 100644 | |
--- a/templates/cart.liquid | |
+++ b/templates/cart.liquid | |
@@ -398,7 +398,7 @@ | |
</div> | |
{% endcomment %} | |
</div> | |
- | |
+ <div id="store-pickup-root"></div> | |
<p><em>{{ 'cart.general.shipping_at_checkout' | t }}</em></p> | |
<div class="grid cart-buttons"> | |
<div class="grid__item one-half small--one-whole text-center"> | |
@@ -485,6 +485,39 @@ | |
var cart = {{ cart | json }}; | |
</script> | |
+<script> | |
+ window.STORE_PICKUP_CONFIG = { | |
+ pointsUrl: 'https://zasilkovna-proxy-kitandkin.now.sh', | |
+ rootElementId: 'store-pickup-root', | |
+ checkoutBtnId: 'checkOutButton', | |
+ formId: 'cart-form', | |
+ moreInfo: 'Bližší informace o výdejním místě', | |
+ zasilkovnaSearchPlaceholder: 'Začněte zadáním Vašeho města', | |
+ placeNameInCompany: true, // Should place name be filled in company or last_name | |
+ pickupLocale: 'cs-PU', | |
+ baseLocale: 'cs', | |
+ shippingOptions: [ | |
+ { | |
+ key: 'shipping', | |
+ name: 'Česká Pošta', | |
+ price: 'od 99 Kč', | |
+ }, | |
+ { | |
+ key: 'zasilkovna', | |
+ name: 'Zásilkovna', | |
+ price: 'od 49 Kč', | |
+ }, | |
+ ], | |
+ } | |
+</script> | |
+<script src="{{ 'store-pickup.js' | asset_url }}" defer="defer"></script> | |
+<style> | |
+ #store-pickup-root > div > div { | |
+ max-width: initial; | |
+ margin-bottom: 1rem; | |
+ } | |
+</style> | |
+ | |
{% unless settings.shipping_calculator == 'Disabled' %} | |
<script> | |
theme.strings = { |
Author
stlk
commented
Oct 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment