View difference between Paste ID: uqq4iEuE and EaNxaZih
SHOW: | | - or go back to the newest paste.
1
{% if context == "cart" or context == "checkout" %}
2
<script>
3
FC.client.on("render.done", function() {
4-
    var message = '<h4>Shipping too expensive?</h4><p>Cases are available in Europe from our distributor Density Labs! <a href="#" style="text-decoration:underline;">Click here for more details.</a></p>';
4+
    var message = '<p>Note: Add 1-2 business days for processing.</p>';
5-
    var countries = ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IS', 'IT', 'LV', 'LT','LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'CH', 'GB', 'IS', 'LI', 'NO'];
5+
6
    if ($(".shipping-note").length == 0 && FC.json.shipping_address.shipping_results.length > 0) {
7-
    if (countries.indexOf(FC.json.shipping_address.country) > -1) {
7+
        if (FC.json.context == "checkout") {
8-
        if ($(".shipping-note").length == 0 && FC.json.shipping_address.shipping_results.length > 0) {
8+
            $(".fc-checkout__section--shipping-results").append('<div class="row shipping-note"><div class="col-sm-10 col-sm-push-1">' + message + '</div></div>');
9-
            if (FC.json.context == "checkout") {
9+
        } else {
10-
                $(".fc-checkout__section--shipping-results").append('<div class="row shipping-note"><div class="col-sm-10 col-sm-push-1">' + message + '</div></div>');
10+
            $(".fc-shipping-rates").append('<div class="fc-input-group--sidebar shipping-note"><br>' + message + '</div>');
11-
            } else {
11+
12-
                $(".fc-shipping-rates").append('<div class="fc-input-group--sidebar shipping-note"><br>' + message + '</div>');
12+
13-
            }
13+
14
</script>
15-
    } else {
15+