{% assign showMap = true %} {% for attribute in order.attributes %} {% if attribute.first == "LocationId" %} {% assign showMap = false %} {% endif %} {% endfor %} {% if shipping_method.title contains "common-word-for-delivery-method-name-from-Shopify" and showMap == true %} <script type="text/javascript" src="https://xconnector.app/js/xconnector-pickup-points.js?shop=your-shop-domain.myshopify.com"></script> <script type="text/javascript"> {% assign date = "now" | date: "%Y%m%d%H" %} var xConnector = { 'token': '{{ 'acces-token-from-xConnector-Tools' | append: date | md5 | append: date }}' }; if (typeof XCONNECTORPICKUP != "undefined") { window.openWidget = function() { XCONNECTORPICKUP.Form.widgetContext = "thank-you"; {% if shipping_method.title contains "courier1-name-from-delivery-method-name" %} XCONNECTORPICKUP.Form.showPopup(Shopify.shop,'xconnector-courier-name'); {% endif %} {% if shipping_method.title contains "courier2-name-from-delivery-method-name" %} XCONNECTORPICKUP.Form.showPopup(Shopify.shop,'xconnector-courier-name'); {% endif %} return false; } Shopify.Checkout.OrderStatus.addContentBox( '<h2 id="orderPickup__title">Select a pickup point!</h2>', '<p id="orderPickup__desc"><a class="" href="#" onclick="window.openWidget()">Click here to choose the pickup point.</a></p>'); openWidget(); } </script> {% endif %}