You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
We really like using the Auto Trigger Free Shipping Threshold, but the question has arisen - is there a way to limit it to Domestic shipping only? Specifically, if it is an international order, no free shipping applies. International rates are so expensive, it doesn't make economic sense to offer it.
Using the shopping cart Free Shipping system is so much easier than a custom shipping script. We're hoping there is a way to limit the scope of the offer.
Offline
You will need to use a custom script to handle this, something that leverages realtime rates using the base functions as well as disables free shipping for international. The example below pulls rates from UPS, FedEX and UPS. Change as needed:
<?php $info = $this->globals('ecom.customship'); $custom = array(); $delinfo = array('stateprov' => $info['stateprov'], 'country' => $info['country'], 'postalcode' => $info['postalcode'], 'rescom' => $info['rescom'], 'shipstateprov' => $info['shipstateprov'], 'shipcountry' => $info['shipcountry'], 'shipzip' => $info['shipzip'], 'shipmethods' => 'UPSTOOLS, USPS, FEDEX', 'shiptype' => 'R'); $result = $this->include_namespace('ecom','shiprealtime',array('delinfo' => $delinfo, 'packages' => $info['packages'])); if (!(empty($result))) {foreach ($result as $num => $service) {$custom[$service['name']] = $service['amount'];}} if ($info['country'] != 'United States') {$this->globals('ecom.ship_freehandled',1);} $this->globals('ecom.customship_response',$custom); ?>
Offline
Here is the Custom shipping script we're using to use Realtime rates + The Free Shipping system built in, but restrict to the U.S. lower 48 states.
<?php // 022517 offers the free shipping functionality of the shopping cart ONLY to Domestic USA lower 48 states $info = $this->globals('ecom.customship'); $custom = array(); $delinfo = array('stateprov' => $info['stateprov'], 'country' => $info['country'], 'postalcode' => $info['postalcode'], 'rescom' => $info['rescom'], 'shipstateprov' => $info['shipstateprov'], 'shipcountry' => $info['shipcountry'], 'shipzip' => $info['shipzip'], 'shipmethods' => 'USPS, FEDEX', 'shiptype' => 'R'); $result = $this->include_namespace('ecom','shiprealtime',array('delinfo' => $delinfo, 'packages' => $info['packages'])); if (!(empty($result))) { foreach ($result as $num => $service) { $methodname = $service['name']; if (!(empty($service['delest']))) { $methodname .= ' (' . $service['delest'] . ')'; } $custom[$methodname] = $service['amount']; } } if (($info['country'] == 'United States') && ($info['stateprov'] != 'Alaska') && ($info['stateprov'] != 'Hawaii')) { } else {$this->globals('ecom.ship_freehandled',1);} $this->globals('ecom.customship_response',$custom); ?>
Offline