g

Zone Based Shipping

Introduction

This module solves the problem of rate calculation for shipping costs by handling products being packed in an optimal way and shipped with appropriate shipping rate that matches the shipping location.

ZBS is compatible with CART2 and CART3. In order to enable Zone Based Shipping go to centre options and add zonebasedshipping.

Product or variants should have dimensions defined. This can be done in the details of each product on tab Shipping or for variants in the variant details. 

ZBS consists of following elements:

  • Introduction
  • Module Configuration
  • Companies
  • Packages
  • Rates
  • Adding new rates (Fedex, Australia Post and Custom Rate)
  • Zones
  • Packing and Rate search outcome
  • Templates (frontend)
  • Pickup Rates & Instore 

Module Configuration

It is important to setup the shipping origin, from where the shipment will be sent. This is set by using the fields under the "Shipper" section.

By default the setting for "Use rate dimensions if suitable packaging isn't available" is on. This means that in case there are no Packages defined or

the products are too big to fit in any package, ZBS will try to find a suitable rate and create a package based on dimensions from those rates. This option will narrow the cases where shipping is unavailable, as long there is a zone defined for (shoppers) shipping destination.

Companies

A company in ZBS represents an individual shipping provider with distinct rates. You will need to create one or more of these based on how many different providers you use to ship your orders. When creating a Company in ZBS you may either choose a shipping service that has been integrated with Core dna such as FedEx or set up a Custom company. Assuming you are using an integrated shipping service you will have options similar to those show in the below screenshot. These systems require specific logon parameters which are provided by the shipping service.

If you instead choose the Custom company type, you will need to configure the Rates and Packages manually.

Volumetric divisor

The cost of a shipment can be affected by the amount of space that it occupies, rather than the actual weight. This is the volumetric (or dimensional) weight.

By default ZBS sets this value to be at 2500.

Reference: http://www.dhl.com.au/en/tools/volumetric_weight_express.html

Packages

Packages are boxes where the items/products will be packed.

Rates

Rates are used to determine the cost of shipping products. You may define rates based on the weight of the products to be shipped, the size and quantity of packages required to ship the products or flat rates.

Ship by

  1. Flat Rate - packed boxes have to comply with the dimensions and weight in order to be shipped with particular rate.
  2. Ship by Weight - see Additional Options
  3. Ship by Cubic Weight - see Additional Options
  4. Ship by Quantity - see Additional Options
  5. Ship by Total price - see Additional Options

The "Apply to" option is used to determine what the rate value will be applied to in order to determine the final shipping cost: 

  1. Package - price will be calculated based on how many packages can fit in this rate. (Rate Value * Packages = Final Rate Price)
  2. Cart - Price value is applied on the total of the cart, number of Packages are irrelevant.

Additional Options Weight, Cubic Weight, Quantity, Total price can have additional settings that can override the Rate Value (price) by adding range, amount and modifier ($ price / % price modification based on percentage).

Example:

Rate $10

Ship by Quantity ranges:

0 - 2 : 19 $

3 - 4 : 30 $

5 - infinity : 45 $

#1 If cart contains 2 or less then 2 items the shipping price will be $10 + $19

#2 if cart contains 3 to 4 items, shipping price will be $10 + $30

#3 if cart contains 5 ore more items, shipping price will be $10 + $45

Let say that we have 4 items packed in 2 boxes (Packages)

If Apply To

Package - price will be $10 + $19 x 2 (boxes) = $380 shipping cost

Cart - price will be ($10 + $19)

Infinite rate

If the dimensions and weight settings for a rate are set to zero, the rate will apply regardless of the size or weight of the product(s) to be shipped.

This is used to set a rate that can be applied to products which cannot fit in any defined package or products which have not had their dimensions set.

Adding new rates (Fedex, Australia Post and Custom Rate)

This is related to Fedex, Australia Post and Custom rates.

In case a you wish to add another rate in the system, it has to be added to the zone as well, in order to be active.

Custom Rates:

  1. Go to "Company" and click on "Rates" under company name, add new rate(s) and save
  2. go to "Zones"
  3. select the zone where the new rate should be active
  4. select the company where this rate belongs to,
  5. new rate will appear in the list
  6. check the your new rate
  7. save the zone

Fedex, Australia Post:

  1. go to "Zones"
  2. select the zone where the new rate should be active
  3. select the Fedex or Australia Post from company list (Search shipping rates by company),
  4. new rate options will appear in the list
  5. check the rates you wish to add to this zone,
  6. save the zone

Zones

Zones represent the area (Country, State, City and postcode) where selected rates are applicable.

In order to setup the a zone, select a Company and all available Rates for that company will load up in the Shipping Rates list or in case of Fedex and Australia Post the list will show shipping methods.

Select the rates available for this zone.

Select a country for this zone, If the country has more detailed levels of administrative divisions like state or cites a NEXT button will appear.

(step 1)

If NEXT button is clicked a user will get an option to search for more specific location.

(step 2)

The final step is to chose the exact postcodes that corresponds to the selected locations from step 2.

(step 3)

Packing and Rate search outcome

Once the Shopper (from the site) selects the products and enters shipping location ZBS will check if the order can be shipped to Shippers location and calculate the shipping cost.

Use case
ZBS response

If there is no zone that includes Shoppers location (No matching country and no "Rest of the World" zone)

(can not deliver) shopper can NOT checkout
If there are no boxes and no rates and no zones sett up in DXP(can not deliver) shopper can NOT checkout
If there is a product that can not fit in a defined packaging (a fake rate is created with $0 shipping costs called "Call for shipping")shopper CAN checkout
If there is a zone for shoppers location but no rate found("Call for shipping") shopper CAN checkout

Rates from a web service will be queried if there is a box defined, if not the box will be created based on the volume of the products in the cart.

Fake boxes will be ignored and no request towards a web service will be made. This is because a fake box is created out of a rate and rates are specific per Company.

In case there are more then 3 boxes (Packages), ZBS will not use the Fedex or Auspost. This limit is set to prevent ZBS from making excessive requests towards a web service which will result in a slow page load.

No dimensions specified for a product - system will search for a infinite rate, because that is the only rate that can carry the product(s) with undefined dimensions. If no infinite rate found but there is a zone matching the shoppers location, ("Call for shipping") and shopper CAN checkout.

Unable to deliver, no boxes & no rates, no zones.

Templates (frontend)

/modules/prodcatalogueorder/templates/payment.html

<{if $zbsEnabled}>
<select name="delivery">
<option value="">Please select your Shipping & Delivery Option</option>
<{$preSelectShipping $config_options_delivery|count eq 1}>
<{if !empty($config_options_delivery)}>
 <{foreach $config_options_delivery as $curkey => $curoption}>
 <{$selected $smarty.session.delivery eq $curkey OR $smarty.post.delivery eq $curkey OR $preSelectShipping}>
 <option value="<{$curkey}>" <{($selected) ? 'selected' ''}>/>
 <span><{$curoption|stripslashes}></span>
 </option>
 <{/foreach}>
<{/if}>
</select>
<{else}>
ZBS is not enabled show <select/> for old shipping module
<{/if}>

This will show available rates.

Pickup Rates & Instore 

ZBS will allow new rates of type Pickup, you can set the price and add to the zone as normal. On each product you now have two new switches under the shipping tab (Only for ZBS). One switch, 'Instore' will allow the product to be shipped and picked up instore, so if you are checking out this item, all available rates (pickup & delivery) will be shown. The second switch, 'Pick Up Only' becomes available once you enabled the In store pickup. This switch will only show the configured pickup rates on checkout. Products who don't have any of these switches enabled, will be considered 'Shipping Only'.

If you have more than one item, then Core dna will perform logic to figure out which rates to show, e.g:

Two drop downs are shown when we have conflicting shipping rates, e.g: ship only and pickup only. Each drop down will display the rates and pricing as normal.

Template changes required to show two dropdowns for checkout:

<{$shippingDisplay $cart3->getShippingDisplay()}>
<{$pickUpRates $cart3->getShippingPickupRates()}>
<{$shippingRates $cart3->getShippingRates()}>
<{if in_array('shipping'$shippingDisplay)}>
 <h5>Delivery: Shipping</h5><br>
 <select name="shippingRateId" class="dk">
 <option value="">Please select your Shipping & Delivery Option</option>
 <{foreach $shippingRates as $id => $data}>
 <option value="<{$id}>" <{if $rateId == $id}>selected<{/if}>/>
 <span><{$data.name|stripslashes}> $<{$data.price}></span>
 </option>
 <{/foreach}>
 </select><br><br>
<{/if}>
<{if in_array('pickup'$shippingDisplay)}>
 <h5>Delivery: Pick Up</h5><br>
 <select name="pickupRateId" class="dk">
 <option value="">Please select your Pick Up Option</option>
 <{foreach $pickUpRates as $id => $data}>
 <option value="<{$id}>" <{if $pickupRateId == $id}>selected<{/if}>/>
 <span><{$data.name|stripslashes}> $<{$data.price}></span>
 </option>
 <{/foreach}>
 </select><br>
<{/if}>


this can used anywhere where cart3 is present.

You can also get this data from the preview response on cart3

under the 'zbs' key you can find all the rates to use. If cart3 detects that it must check for an instore pickup, it will return an error on the shipping page looking for the pickup to be selected.