{% assign showMap = true %} {% for attribute in order.attributes %} {% if attribute.first == "LocationId" %} {% assign showMap = false %} {% endif %} {% endfor %} {% if shipping_method.title == "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"; XCONNECTORPICKUP.Form.showPopup(); 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 %}