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.
Hi,
We are currently setting up shipping rules based on zones. I’ve have been making adjustments to them base on what we already offer which are simpler than the Parcelforce ones you supplied in the CSV’s. I have used the Free Shipping Threshold, however, we have a different thresholds for different zones, the lowest being UK mainland and the highest being some European countries, with others having no free shipping. At the moment it just offers the lowest shipping with free deliver regardless of the country it’s shipping to.
I’ve seen in another forum topic a mod that was for real time shipping which did something similar. Is that the way to go or is it custom shipping? I still want to utilise the zones though so I assume that custom shipping is not the way to go.
Thanks
Offline
Use custom shipping for the inventory items and something like this for your custom shipping script. Adjust as necessary:
<?php $info = $this->globals('ecom.customship'); $custom = array(); $freeloc = array('United States', 'Canada'); $freeset = 0; $ECOM_Ship =& $this->quick_object('ECOM_Ship','ecom'); $zonearray = array('weight' => $info['weight'], 'total' => $info['total'], 'country' => $info['country'], 'postalcode' => $info['postalcode']); $zone_rates = $ECOM_Ship->getrates_zone($zonearray,$info['packages']); foreach ($zone_rates as $num => $rateinfo) { if ((in_array($info['country'],$freeloc)) && (empty($freeset))) { $freeset = 1; $rateinfo['amount'] = 0; $this->globals('ecom.ship_freehandled',1); } // End of if statement. $custom[$rateinfo['name']] = $rateinfo['amount']; } // End of if statement. // +-- // | Globalize result // +-- $this->globals('ecom.customship_response',$custom); ?>
Offline
Thanks for that.
I've still got some changes to make to the zones to fit how we are charging the diferent zones. So I will get that all that before I take a look at your example code, but it looks like it will do what we want.
Offline