Skip to content

Shipping Suite

Shipping Suite Cover

Introduction

It's widely reported that high shipping costs are the main reasons why people might abandon shopping carts. Hence, optimizing this aspect is vitally important for every eCommerce store.

Out of the box, Magento only allows you to restrict shipping methods for specific countries. Changing the default shipping rates and costs, offering free shipping or using promotional rates are not available in the default version of the platform.

Magento 2 Shipping Suite extension not only has the above-mentioned functionality, but also significantly expands it.

To better understand the key features of the extension, it is important to define several shipping-related terms.

Shipping Carrier

Generally, a shipping carrier is a company that delivers customers' orders by air, land, sea, etc. For example, popular shipping carriers are DHL, UPS, FedEx and others. Some of them available in Magento 2 out of the box (one can find them in STORES ⟶ Configuration ⟶ SALES ⟶ Shipping Methods)

Mageworx Shipping Carrier

Others can be setup with the help of third-party extensions.

Note that all carriers are connected with shipping methods. As you may see, the configuration page has the name (Shipping Methods not the Shipping Carriers). This is because the list of the carriers includes the setup of all shipping methods. Also, in order to create a new method, one has to specify a carrier that will be associated with it.

Shipping Method

A shipping method is a way to fulfill the delivery to customers via a shipping carrier.

Shipping methods can vary according to different criteria, such as a warehouse location, country, shipment sizes, weights, the desired delivery time. Some examples of the Shipping Methods are USPS Express Mail, DHL Flat Rate Box Shipping, UPS two-day, DHL Jetline etc.

One can find all the list of the shipping methods available in the Magento 2 installation by checking the shipping methods condition section in e.g. MARKETING⟶Promotions⟶Cart Price Rules.

Mageworx Shipping Metod

Here, you can see the list of the methods arranged in the groups of the corresponding carriers.

Shipping Rates

Shipping rate is a price at which a certain order is delivered from point A (merchant's warehouse or store) to point B (the customer).

With the extension, shipping rates can be defined for each new/existing shipping method.

Rates are set by the shipping carrier. Their amount depends on various factors, such as the mode of transport (truck, train, ship, aircraft), the weight of the ordered goods, product dimension and the distance to the delivery destination.

The default Magento allows importing a CSV list of the table rates for only one method of one carrier.

Mageworx Shipping Rate

So to sum up, the full structure of our extension supposes such use mechanism :

  1. Manage Shipping Carrier

  2. Add Shipping Methods for this carrier

  3. Create or adjust the method’s Shipping Rates

Location Groups

This notion refers to the geographical area that you want to ship to. It may be useful when separate areas of the countries/group of countries share some mutual shipping costs (like EU region)

Requirements and Installation

Shipping Suite supports both Community and Enterprise edition of Magento starting from version 2.1. The current version of Magento installed on your website can be found in the lower right corner of any backend page.

Magento 2 Version

Shipping Suite has 3 separate ways of installation:

1) Copy the code (ready-to-paste package);
2) Use local Composer;
3) Use MageWorx Repository.

Extension Configuration

To start the setup, we'll go through the full aforementioned algorithm: Carriers-Methods-Rates. After this initial setup is ready, we'll check the Shipping Zones configuration and how Shipping Rules and Restrictions are working.

Shipping Carriers

Log into the Magento Admin panel and go to STORES ⟶ MageWorx Shipping Suite ⟶ Shipping Carriers.

Mageworx Shipping Carrier

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new carrier click the Add New Carrier button.

The initial setup of the carrier consists of the 2 tabs.

1. Carrier settings

  • Default Title - A name of the Shipping Carrier. The customer will see it during checkout.

  • Sort Order - A sort order of a shipping carrier on the checkout.

  • Is Active - The toggle that lets you enable/disable the carrier to be visible on the website.

  • System Name - That is the name of the carrier made for your reference. This information won't be visible on the frontend.

  • Carrier Code - The system code for the carrier name. This information won't be visible on the frontend.

  • Store View - You can assign the certain shipping carriers to the store views you want these carriers will be visible on.

2. Labels

Mageworx Shipping Carrier Labels

Labels Section is designed for different frontend names of the carrier on different store views. Some carriers may need to be translated and, for this matter, this section allows specifying the appropriate name. Please note that if the string is empty, the initial Title specified in the Carier's configuration will be used

Once you hit the Save button, the Method Settings appear. Here, you can tweak the Shipping Methods for this Carrier.

Mageworx Shipping Carrier Settings

Clicking the Add Method opens Shipping Method configuration settings. Actually, these are the same settings as the main Shipping Methods configuration with the only difference: if you specify the Shipping Method from the scratch, you need to select the carrier of this message while if you open it via the carrier this information is redundant and, therefore, hidden.

Mageworx Shipping Carrier or Method

Shipping Methods

To configure Shipping Method, go to STORES ⟶ MageWorx Shipping Suite ⟶ Shipping Methods.

Mageworx Shipping Method

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new carrier, click the Add New Method button.

The initial setup of the method consists of the 2 tabs.

1. Method Information

  • Carrier - in the dropdown you can select the desired carrier created in the STORES ⟶ MageWorx Shipping Suite ⟶ Shipping Carriers

  • Title - the name of the shipping method title. The customer will see it during the checkout.

  • Code - the system code for the method name. This won't be visible on the frontend.

  • Active - the toggle that enables/disables the carrier on the website.

  • Store View - this multi-select allows you to assign a method to ceertain store view(s).

  • Hide a method if there are no valid rates - in case the shipping method doesn't contain any rates and this setting is enabled, the method will be hidden.

  • Replace a method title if rate was applied - if the rate has it own title, enabling this setting will replace the original method title with the rate's one.

  • Price - the initial price of the shipping method for the customer. If no rates are applied, this will be regarded as the method's price.

  • Min-Max Price Threshold - if multiple rates can be applied for some cart, the price can be changed significantly, so it is highly recommended to define the lowest and the highest possible price.

  • Cost - the initial price of the shipping method for the merchant. If no rates are applied, this will be regarded as the method's cost.

  • Multiple rates price calculation - this setting manages the method price calculation if multiple rates can be applied for some cart. Can be the rate with the min or max price, the rates can sum up or the rate with the highest priority only to be selected.

  • Free Shipping Allowed - the store owner may the Cart Price Rules specified in MARKETING⟶Promotions⟶Cart Price Rules

Alternatively, this can be some setting in the third-party extension. Our methods will rewrite this original rule but if the store owners wish it to be accomplished, they may enable the Free Shipping Allowed toggle.

The following method configuration provides the possibility to specify the delivery time. It can be taken globally for the method or specified directly for any rate.

  • Display the Estimated Delivery Time on front-end - enables or disables this feature.

  • If Allow to replace Estimated Delivery Time setting is enabled, then the rates ETA will replace the original one.

  • Estimated delivery time min and max specify the delivery time range. These values can used in the description using the {{min_days}} {{min_hours}} / {{max_days}} {{max_hours}} variables as the template in the Delivery Time Message field.

  • Estimated Delivery Time Display Type can be either days or hours.

  • Estimated Delivery Time Message - This message will be displayed with the method title. You can use the following variables that will be replaced with the corresponding values: {{min_days}} {{max_days}} {{min_hours}} {{max_hours}}.

Examples

1) "Estimated Delivery Time Display Type" is set to "Days only (rounded)".
Estimated delivery time min = 5
Estimated delivery time max = 6

{{min_days}} will output 5,
{{max_days}} will output 6,
{{min_hours}} will output nothing,
{{max_hours}} will output nothing.

If the min or max value is set as the decimal value (5.6), then it will be rounded according to the math rules.

2) "Estimated Delivery Time Display Type" is set to "Hours"
Estimated delivery time min = 5
Estimated delivery time max = 6

{{min_days}} will output nothing,
{{max_days}} will output nothing,
{{min_hours}} will output 5,
{{max_hours}} will output 6.

If the min or max value is set as the decimal value (5.6), then it will be rounded according to the math rules.

3) "Estimated Delivery Time Display Type" is set to "Days with Hours"
Estimated delivery time min = 5
Estimated delivery time max = 6

{{min_days}} will output 5,
{{max_days}} will output 6,
{{min_hours}} will output nothing,
{{max_hours}} will output nothing.

4) Estimated delivery time min = 5.4
Estimated delivery time max = 6

{{min_days}} will output 5 hours 10 minutes,
{{max_days}} will output 6,
{{min_hours}} will output nothing,
{{max_hours}} will output nothing.

2. Labels

Mageworx Shipping Method Labels

Labels Section is designed for different frontend names of the method on different store views. Some methods may need to be translated and for this matter this section allows specifying the appropriate name. Please note that if the string is empty, the initial Title specified in the methods configuration will be used.

You can also specify the delivery text for separate store views as well

Mageworx Shipping Method Labels

Once you hit the Save button, the Rates Settings appears. It has the grid with the Shipping Rates for this Method.

Press the Add New Rate button to specify shipping rates for this method.

Shipping Rates

Shipping Rates configuration consists of 3 tabs.

1. Rate Information

Mageworx Shipping Rates Configuration

Unique Code. The system code for the rate name. This won't be visible on the frontend.

Title. If populated, this would replace the initial name of the corresponding shipping method.

Active. The toggle that allows enabling/disabling the rate itself.

Priority. The bigger the number the higher the priority. Includes both positive and negative numbers.

Store View. The rates can be enabled for a selected store view(-s) only.

Price Calculation Method Allows either to overwrite the initial price of the method or to sum this value to the initial one.

The Estimated Delivery Time min and Estimated Delivery Time max, if populated, overwrite the method's delivery time range specified in the method's configuration.

2. Conditions

Mageworx Shipping Rates Conditions

To begin with, the store owner can choose the shipping Country and the specific Region.

To specify the exact values of the customer's geographic location, it is possible to narrow the conditions down to the zip (postal) codes. The Zip Codes Validation Mode configuration has three settings:

  • none; in this case, the entire condition doesn't check the entered zip (postal) codes;

  • zip codes list; in this case, one can add the list of the zip (postal) codes separated by the commas to validate the rule;

  • zip codes ranges; in this case, one can add the ranges of the zip (postal) codes to validate the rule.

I If the zip code list was selected, two settings appear below this configuration:

Mageworx Shipping Rates Conditions

Enable the Exclude Zip Codes option if you need to exclude the following list of the zip (postal) codes to validate this condition. The Zip Codes is the comma-separated list.

II If the zip codes ranges was selected, the diapason format and ranges workspace appears below:

Mageworx Shipping Rates Conditions

First, you need to select the Diapason Format. Our extension supports various postal code formats:

  • for most countries select the default Numeric format;

  • for the postal codes in the UK, choose the Alphanumeric (UK). This format handles the rather complex system of the postal codes in the UK, dividing the code into 5 separate sections;

  • for the postal codes in the Netherlans, choose the Alphanumeric (NL). The postal code in the Netherlands comprises 2 separate sections and our extension uses this logic for handling such requests;

  • for the alphanumeric zip codes in any other countries, select Alphanumeric (Other).

When this is done, click the Add New Diapason. After that, you can specify the first and the last zip (postal) code from the codes range. If you need to exclude this range to validate the condition, click the Exclude toggle. The recycle bin icon deletes the range. The screenshot above provides the possibility to exclue the range of the zip codes (Philadelphia) in the selected region (Pennsylvania). You can combine these ranges: e.g., the first row enables the range of the postal codes, the second row excludes some smaller range within the first, bigger one.

Below these settings, the price, quantity and weight conditions can be set up:

Mageworx Shipping Rates Conditions

Total Price From and Total Price To stand for the price of all the customer's products.

Total Qty From and Total Qty To stand for the quantity of all the customer's products.

Total Weight From and Total Weight To stand for the total weight of the customer's products.

3. Rate Pricing

Mageworx Shipping Rates Pricing

Rate Pricing provides the price calculation for the rate. Depending on the configuration of the first tab, this setting either rewrites the initial value or adds up to it.

Total Price. Specifies the price of the method.

Price Per Each Product. If the cart consists of 5 units of product A and 3 units of product B, this value will be multiplied by 2 (per each product).

Price Per Each Item. If the cart consists of 5 units of product A and 3 units of product B, this value will be multiplied by 8 (per each item).

The difference between Per Product and Per Items

The "per Item" action uses each row in the cart as multiplier (5 same products in one row and 3 same items in another one is 2 items), the "per Product" action uses an each valid product as multiplier (5 same products in one row and 3 same items in another row = 8 qty).

Price Per Each Product (% of the method price). This depends on the initial price of the method. Assuming the initial price is $ 10. We still have 5 units of product A and 3 units of product B. The value in this field is 10%. Then we multiply 10% * 2 products. This is 20%. 20% from the initial price ($ 10) is $2.

Price Per Each Item (% of the method price). This depends on the initial price of the method. Assuming the initial price is $ 10. We still have 5 units of product A and 3 units of product B. The value in this field is 10%. Then we multiply 10% * 8 items. This is 80%. 80% from the initial price ($ 10) is $8.

Price Per Each Item (% of the item price). This depends on the price of the cart. Assuming we have 5 units of product A ($ 20 each) and 3 units of product B ($ 30 each). The value in this field is 10%. The full price in the cart is 5*20+3*30=190. 10% of the cart is $19.

Price Per 1 Unit of Weight. Depends on the weight units of the product. The unit of measurement defined for your locale in the configuration (can be pounds, grams etc).

Shipping Rules and Restrictions

Extension provides a range of highly-customizable shipping options and restrictions that can be personalized in various ways. To configure Shipping Rules, go to STORES ⟶ MageWorx Shipping SuiteShipping Rules and Restrictions.

Mageworx Shipping Rules

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new rule, click the Add New Rule button.

Rule configuration consists of 4 tabs.

1. Rule Information

Mageworx Shipping Rules

Rule Name and Description allow the store owner to locate a rule whenever it is needed. This information is shown in Shipping Rules and Restrictions grid.

Status can be changed to Inactive if the rule is currently not needed.

Priority The bigger the number, the higher the priority. Сan include both positive and negative numbers. The rule with the highest priority will be the first one to be executed.

Mageworx Shipping Rules

The store owner can assign the rule to some particular store view and the clients' customer group.

Mageworx Shipping Rules

Further, it is possible to manage time interval specification/settings. From here, you can set the days of the week, as well as the time rage when your shipping rule gets applied to orders. Enabling the Use Time checkbox shows the extra settings to specify the hours range when the rule is active or not.

2. Conditions

The extension allows you to create flexible conditions based on the product and cart attributes. You can also create the combinations of the different conditions and use the advanced logic operators ALL/ANY.

Mageworx Shipping Rules Conditions

Product Attributes

The product attribute conditions allows you to create any conditions & combinations of the conditions using any product attribute.

Note

You should enable the "Use for Promo Rule Conditions" setting for the product attribute to display it in the list of available attributes in the conditions.

Cart Item Attributes

These attributes allow you to create the rules based on the specific cart items parameters:

Mageworx Shipping Rules Conditions

  • Cart Item SKU (including custom options) - this condition verifies the final SKU of a product in the cart. If the product has the custom options, that add the SKU to the main product SKU, this rule will validate them as well, i.e. the final SKU with all extras will be checked.

  • Price in Cart - this condition verifies the product price in the cart, including the custom options and configurations.

  • Quantity in Cart - this condition verifies the product quantity in the cart, so you can create the shipping rules to be applied if a specific quantity of the necessary products are added to the cart.

  • Row Total in Cart - this condition verifies the total price of a product in the cart (the product price * quantity added).

Stock Item Attributes

This set of the attributes allows you to build the conditions based on the product stock and backorder status:

Mageworx Shipping Rules Conditions

  • Backordered - this condition has the possible values Yes/No and it checks if Magento 2 backorder is triggered for any product matching the other conditions (if any) in the cart.

Example

1) Let's assume, the product A has the available stock as 10 items and the backorder feature is enabled for it in Magento 2 store. A customer adds 20 items of this product to the cart -> 10 items are backordered by Magento 2 -> the backorder tirgger is activated and the rule with this condition will be validated.
2) Similar example but the product A is out of stock and the backorder feature is enabled for it in Magento 2 store. A customer adds any quantity of this product to the cart -> the backorder tirgger is activated and the rule with this condition will be validated.

  • Qty - this condition allows you to add the conditions based on the available product stock. It might be helpful if you need to add the rules if a product's stock is below a specific threshold or the product stock is in a specific range.

  • Qty Backordered - this condition verifies the product quantity backordered by Magento 2 in the cart.

Example

1) Let's assume, you have the rule with the following condition: Qty Backordered is more than 2. The product A has the available stock as 10 items and the backorder feature is enabled for it in Magento 2 store. A customer adds 20 items of this product to the cart -> 10 items are backordered by Magento 2 -> the quantity backordered condition is validated (20 > 2) and the rule will be applied.

  • Stock Item Status - this condition allows you to create the conditions based on the product stock status (In Stock / Out of Stock).
Cart Attributes

This set of the attributes allows you to create the conditions based on the customer's cart attributes:

Mageworx Shipping Rules Conditions

Among Magento 2 standard cart attributes, the extension adds some specific ones:

  • Subtotal incl Tax - this condition allows you to apply a shipping rule based on a subtotal including a tax. This condition migiht be helpful if the subtotal in your Magento 2 includes the tax (STORES ⟶ Configuration ⟶ SALES ⟶ Tax ⟶ Shopping Cart Display Settings ⟶ Display Subtotal is set to Including tax). In this case if you create a rule with the condition by the Subtotal, Magento 2 will calculate the subtotal excluding tax. This condition allows using the subtotal with tax instead.

  • Subtotal with discount - this condition uses the subtotal after applying a discount. Thus, you can create the rules based on the final subtotal value. It might be helpful if you offer the free shipping for all orders above a specific value and you need to this total will be calculated after applying the discounts.

  • Coupon Code - this condition allows you to apply a shipping rule if a specific discount code is applied.

  • Shipping address parameters - these conditions allow you to apply a shipping rule if a specific shipping country, city, state/region, post code, street address or a city is entered by a customer.

  • Location Group (Shipping Zone) - this condition allows you to apply a shipping rule if a specific location group (shipping zone) created in our extension is used.

Customer Attributes

These attributes allow you to create the rules based on the specific customer attributes in your store. Example of the customer attributes:

Mageworx Shipping Rules Conditions

3. Actions

The Actions section specifies what exact action(s) should be performed if the conditions are triggered.

Mageworx Shipping Rules Actions

The Stop Further Processing. allows the store owner to block all the other rules with lower priority when the current rule is triggered. If disabled, then the matching rules with a lower priority will be fulfilled.

The Type defines the action(s) you need to perform:

  • Modify Shipping Cost
  • Hide Shipping Method
  • Change Data
  • Show Shipping Method with Minimal Price
Modify Shipping Cost

This action allows you to modify the shipping cost using flexible rules and calculations, selected in the Modifier multi-select field:

Mageworx Shipping Rules Modify Method

The chosen actions are applied to the shipping methods, selected in the Apply to Shipping Methods box.

Mageworx Shipping Rules Modify Method

The full list of the Modifications:

Shipping Cost (fixed/percent) (overwrite) Shipping Surcharge (fixed/percent) (add) Shipping Discount (fixed/percent) (deduct)
Shipping Cost Amount Shipping Surcharge Amount Shipping Discount Amount
Shipping Cost per Product Shipping Surcharge per Product Shipping Discount per Product
Shipping Cost Per Product Qty after X Qty Shipping Surcharge per Product Qty after X Qty Shipping Discount per Product Qty after X Qty
Shipping Cost Per Item Shipping Surcharge Per Item Shipping Discount Per Item
Shipping Cost Per Item after X Items Shipping Surcharge Per Item after X Items Shipping Discount Per Item after X Items
Shipping Cost Per 1 Unit of Weight Shipping Surcharge Per 1 Unit of Weight Shipping Discount Per 1 Unit of Weight
Shipping Cost Per 1 Unit of Weight after X Units of Weight Shipping Surcharge Per 1 Unit of Weight after X Units of Weight Shipping Discount Per 1 Unit of Weight after X Units of Weight
Shipping Cost Per X Unit of Weight Shipping Surcharge Per X Unit of Weight Shipping Discount Per X Unit of Weight
Shipping Cost Per X Unit of Weight After Y Units of Weight Shipping Surcharge Per X Unit of Weight After Y Units of Weight Shipping Discount Per X Unit of Weight After Y Units of Weight

Shipping Cost totally replaces the initial price of this method. Shipping Surcharge adds the specified price to the initial price of the method. Shipping Discount deducts the specified price from the initial one.

All these available actions can be set as a fixed amount or as a percentage amount. If you specify a percent, the specified percent will be calculated from the products matching the conditions in the Apply to items section. If nothing is specified in that section, all the products added to the cart are used for the calculations.

Below we added the explanation for each action type, separated by the price mode: Overwrite, Surcharge and Discount.

Overwrite mode:

  • Shipping cost Amount - this action overwrite a shipping cost on the checkout to a value specified in a rule.

Note

If you choose the percentage amount, it will be calculated from the initial shipping method price. Example: if a shipping price is $10 and the percentage shipping amount in the rule is 50%, then the final shipping price will be $5 (50% from $10).

  • Shipping cost per Product - this action overwrite a shipping cost on the checkout to a value specified in a rule multiplied by the number of products in the cart. If you have any conditions in the "Apply to items" section, the products matching these conditions will be used only.

Example

"per Product" number is calculated as the number of products added to the cart multiplied to their quantities.
1) If there are 2 products in the cart: product A (qty 5) and product B (qty 3), then the specified shipping cost will be multiplied by 8 (if there are no any conditions in the "Apply to items" section).
2) If the product A from the case above matches the conditions from the "Apply to items" section only, then the specified shipping cost will be multiplied by 5, i.e. the product B will be ignored.
3) If you choose the percentage amount, it will be calculated from the prices of the products (multiplied by their quantities in the cart), which are matching the conditions in the "Apply to items" section.

  • Shipping Cost Per Product Qty after X Qty - this action does quite the same as the previous one, but the multiplier will be calculated as the difference between the product quantity added to the cart and the X quantity, specified in this rule.

Example

1) If a customer added the product A in quantity of 6 to the cart and the X Qty is set as 4, then the specified shipping cost will be multiplied by 2 (6 - 4).
2) If a customer added the product A in quantity of 4 to the cart and the X Qty is set as 6, then the specified shipping cost won't be multiplied by anything since the X Qty amount is not reached (4 - 6).
The products are validated to match the conditions from the "Apply to items" section here as well.
3) If you choose the percentage amount, it will be calculated from the initial shipping method price.

  • Shipping Cost Per Item - this action overwrite a shipping cost on the checkout to a value specified in a rule multiplied by the number of items in the cart.

Example

"per Item" uses each product row in the cart as multiplier (5 same products in one row and 3 same items in another one is 2 items). I.e. the product quantity is not used.
1) If a customer added the 4 different products to the cart (the number of items = 4), then the specified shipping cost will be multiplied by 4 (if there are no any conditions in the "Apply to items" section).
2) If a customer added 4 products to the cart (the number of items = 4) and only 2 items matches the conditions from the "Apply to items" section, then the specified shipping cost will be multiplied by 2.
3) If you choose the percentage amount, it will be calculated from the prices of the items (not multiplied by their quantities in the cart), which are matching the conditions in the "Apply to items" section.

  • Shipping Cost Per Item after X Items - this action does quite the same as the previous one, but the multiplier will be calculated as the difference between the number of items in the cart and the X items number, specified in this rule.

Example

1) If a customer added the 4 different products to the cart (the number of items = 4) and the X Items is set as 2, then the specified shipping cost will be multiplied by 2 (4 - 2).
2) If a customer added 2 products to the cart (the number of items = 2) and the X Items is set as 4, then the specified shipping cost won't be multiplied by anything since the X Items number is not reached (2 - 4).
The products are validated to match the conditions from the "Apply to items" section here as well.

  • Shipping Cost Per 1 Unit of Weight - this action calculates the shipping multiplier per each unit of the weight in your store. The unit of measurement defined for your locale in the configuration (can be pounds, grams etc).

Example

Let's assume the unit of weight in your store is lbs. The product A has the weight of 100 lbs. If you create a shipping rule with the action Shipping Cost Per 1 Unit of Weight and specify the shipping cost in this rule as $1, then the final shipping price on the checkout will be $ 100 ($ 1 x 100 lbs).
The products are validated to match the conditions from the "Apply to items" section here as well.
If you choose the percentage amount, it will be calculated from the initial shipping method rate, multiplied by the units of weight of the products, which are matching the conditions in the "Apply to items" section.

  • Shipping Cost Per 1 Unit of Weight after X Units of Weight - this action does quite the same as the previous one, but the multiplier will be calculated as the difference between the X weight, specified in this rule, and the product weights in the cart.

Example

Let's assume the unit of weight in your store is lbs. The product A has the weight of 100 lbs. If you create a shipping rule with the action Shipping Cost Per 1 Unit of Weight and specify the shipping cost in this rule as $1 and set the X units of weight as 50 lbs, then the final shipping price on the checkout will be $50 ((100 lbs - 50 lbs) * $1).
The products are validated to match the conditions from the "Apply to items" section here as well.
If you choose the percentage amount, it will be calculated from the initial shipping method rate, multiplied by the units of weight of the products (total weight of the products - X weight), which are matching the conditions in the "Apply to items" section.

  • Shipping Cost Per X Unit of Weight - this action allows you to specify the shipping cost per each X weight.

Example

Let's assume you need to increase the shipping cost per each 100lbs. In this case you can create a shipping rule with the Shipping Cost Per X Unit of Weight and set the X weight as 100 lbs. The shipping cost muliplier will be increased with each 100 lbs only. I.e. if your shipping cost in this rule is $1, the product A has the weight of 150 lbs, the shipping cost will be multiplied by 1 if this single product is added. However, if a customer adds 2 quantities of this product (the total weight is 300 lbs), the shipping cost will be multiplied by 3 (300 lbs / 100 lbs * $1 = $3).
The products are validated to match the conditions from the "Apply to items" section here as well.

  • Shipping Cost Per X Unit of Weight After Y Units of Weight - this action allows you to specify the shipping cost per each X weight after certain weight value.

Example

Let's assume you need to increase the shipping cost per each 100lbs after the total of weight of 200lbs. In this case you can create a shipping rule with the Shipping Cost Per X Unit of Weight After Y Units of Weight and set the X weight as 100 lbs & Y to 200lbs. The shipping cost muliplier will be increased with each 100 lbs when the weight exceeds the 200lbs value. I.e. if your shipping cost in this rule is $1, the product A has the weight of 150 lbs. If a customer adds 2 quantities of this product (the total weight is 300 lbs), the shipping cost will be calculates as follows: (300 lbs - 200 lbs) / 100 lbs * $1 = $1).
The products are validated to match the conditions from the "Apply to items" section here as well.

Surcharge mode:
All actions, described above, are available as the surcharge as well. In this case, the calculated shipping cost will be added to the initial shipping price on the checkout and won't overwrite it. It can be useful if you need to add some shipping surcharges per specific items.

Discount mode:
All actions, described above, are available as the discounts as well. In this case, the calculated shipping cost will be deducted from the initial shipping price on the checkout and won't overwrite it. It can be useful if you need to apply some shipping discounts if specific products are added to the cart.

To select several methods, hold the Ctrl / Cmd key and click the items one by one.

To select a group, hold the Shift key and select the first and the last option.

The Sort Order setting allows you set the order, how the actions should be applied. The actions with higher priority are applied and calculated first. The actions with lower priority are applied after them and they use the shipping prices, calculated in the previous steps. I.e. if one shipping rule has the shipping overwrite (higher sort order) and the shipping surcharge (lower sort order), then the shipping final price will be calculated as shipping overwrite price + shipping surcharge.

Mageworx Shipping Rules Modify Method

If several rules have the same sort order (eg, 0), the rule that comes first on the multi select list will be applied first.

Use Cases

Click here to see the practical Use Cases of this functionality.

Hide Shipping Methods

This action allows to hide any specific shipping method(s) on the checkout and in the cart if the rule is triggered.

Mageworx Shipping Rules Hide Method

This table shows all the methods (including the default Magento ones like UPS, DHL etc and custom methods, created in our extension or in 3rd party extensions) that can be disabled at the checkout. To select several methods, hold the Ctrl/Cmd key and click the items one by one. To select a group, hold the Shift key and select the first and the last option.

Change Data

This action allows you to easily create the shipping rules that will change a shipping method title if specific conditions are met. It might be useful if you need to display different titles for the shipping methods based on the certain conditions without creating separate shipping methods for each case.

Mageworx Shipping Rules Hide Method

In order to change a title of a certain shipping method, you should choose the shipping method in the "Shipping method" drop-down and specify the necessary title in the "Default Title" field. If you need to specify the store-view title, you can do this in the fields for the store view values.

Show Shipping Method With Minimal Price

This action allows you to filter the shipping prices on the checkout dynamically for each customer's order and to keep the shipping method with the minimal price only, i.e. all other shipping methods will be hidden. The "Affected Shipping Methods" multi-select allows you to choose the shipping methods, which should be affected by this action.

Mageworx Shipping Rules Hide Method

By default, the one shipping method with the min price will be shown. If you need to display several shipping methods with the same min price (if such case occurs), then you should select the "Display all methods" check-box.

4. Apply to Items.

It lets you apply the rule to certain products in the cart using their various attributes. By default, the extension uses the rules for the whole cart. If you need to apply some rules to some particular products in the cart, you need to specify them in the apply to button tab.

Note that these rules are made only to filter the applying products. Therefore, you cannot disable some method, it just modifies the price/weight/quantity to be counted.

Mageworx Shipping Rules Modify Method

In this example, only the products with XS size will be counted.

Use Cases

Click here to see the practical Use Cases of this functionality.

Locations Groups

Location Groups refer to the geographical area that you want to ship to.

That may be important, for instance, to differentiate between the continental and non-continental part of the USA or in case you need to provide free shipping within the EU, you can create a custom shipping zone for that.

These zones can be later selected in the Condition Section of the Shipping Rules and Restrictions.

Mageworx Shipping Locations Groups

To configure the Location Group go to STORES ⟶ MageWorx Shipping SuiteShipping Zones.

Mageworx Shipping Locations Groups

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new location group, click the Add New Location Group button.

Location Group configuration consists of 2 tabs.

1. Location Group Information

Mageworx Shipping Locations Groups

Location Group Name and Description allows the store owner to surface, sort out a certain group when it is needed.

Status can be changed to Inactive if the group is currently not needed.

Priority The bigger the number the higher the priority. Includes both positive and negative numbers.

The store owner can assign the group to some particular store view.

2. Conditions

Mageworx Shipping Locations Groups Conditions

Pop-up Zones

Frontend Experience

In the frontend, the extension adds the location block on the upper side of the website.

Note that if you do not observe the popup on the frontend, you need to enable it in the extension's configuration.



Mageworx Shipping Popup Zones

Clicking it opens the popup to specify the customer location.

Mageworx Shipping Popup Zones

First of all, the customer can select the desired zone. It contains the list of the countries that are configured as part of this zone

Mageworx Shipping Popup Zones

And the state/province as well

Mageworx Shipping Popup Zones

No more than 3 shipping zones are shown on the popup (less amount for mobile views). To select another zones the customer can use the buttons on the left/right corners or slide in case the device has the touchscreen.

Mageworx Shipping Popup Zones

To select the desired country and state, the user should click the Save Changes button. The X button is used to close the popup without saving.

Selecting the regions will allow to estimate the possible shipping costs in the product cart

Mageworx Shipping Popup Zones Cart

Backend Experience

To configure Pop-up Zones, go to STORES ⟶ MageWorx Shipping Suite ⟶ Pop-up Zones.

Mageworx Shipping Popup Zones Backend

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

To create a new zone, click the Add New Zone button.

Zones configuration area consists of 2 tabs.

Pop-up Zone Information

Mageworx Shipping Popup Zones Backend

Name. You can specify the name of the zone. It will be visible on frontend and on the backend in the grid in STORES ⟶ MageWorx Shipping Suite ⟶ Pop-up Zones..

Description. This information will be visible on the backend only.

Image. Uploading the image here will show it in the frontend. Not a required field

Mageworx Shipping Popup Zones Backend

Active toggle enables/disables this zone. If disabled, it won't be visible on the frontend.

Priority. The bigger the number the higher the priority. Includes both positive and negative.

Country. Select as many countries here as needed.

Store View. The zones can be enabled for a selected store view(-s) only.

Country Regions

Magento has the ability to select the states/provinces for the country.This comes important at the checkout step.

Unfortunately, in the default functionality, this feature is not available for all the countries (including such popular shipping destinations as the Netherlands or Italy).

Mageworx Shipping Country Regions

The necessity to add the regions manually can cause many problems for the website visitors. The Country Regions option allows adding new regions and editing those provided out of the box.

Backend Configuration

To configure Country Regions, go to STORES ⟶ MageWorx Shipping Suite ⟶ Country Regions.

Mageworx Shipping Country Regions

The regions that are provided out of the box can be temporary disabled or edited. To disable the region, click the Delete option, for editing, hit the Edit link.

To create a new region, click the Add New Region button.

Mageworx Shipping Country Regions

Country specifies the country for the region.

Code provides the technical code for the region.

Is active toggle enables or disables this region, the Is Custom toggle is made to quickly filter the custom regions on the Regions grid on STORES ⟶ MageWorx Shipping Suite ⟶ Country Regions.

The Name field provides the name of the region. In most cases, the Default Name should be the same.

Shipping Methods Per Product

The extension provides the possibility to assign the shipping method for any particular product (or group of products). For this, log into the Magento Admin panel and go to CATALOG ⟶ Products. Choose the desired product to assign the corresponding shipping method.

Mageworx Shipping Configuration

Here, it is possible to select any shipping method that can be used for this particular product. If no shipping method is selected, the extension implements the scenario with all shipping methods enabled.

When the customer adds this product to the cart, only the selected shipping methods will be available for this order. If any other product with different methods is added to the cart, only those methods that are enabled for both products will be shown for this order. If the extension finds no overlapping shipping methods, it won't display any for this product selection on the checkout.

When the store owner saves the product, the selected shipping method/methods will be shown on the products grid.

Mageworx Shipping Configuration

Extension's Configuration

Extension’s configuration settings can be found under STORES ⟶ Configuration ⟶ MAGEWORX ⟶ Shipping Suite. The configuration itself consists of 5 tabs.

Shipping Suite Configuration

Mageworx Shipping Configuration

The Multiple rates price calculation feature is similar to the analogue one in the methods configuration setting, with the only difference that it works globally. This setting lets you manage the method price calculation if multiple rates can be applied to the same cart. It can be the rate with the min or max price, the rates can sum up or the rate with the highest priority only to be selected.

Validation Settings

Mageworx Shipping ZIP Validation

Advanced Postcode Validation: Is Enabled provides the ability to manage such complicated cases as the British Postcodes.

Mageworx Shipping ZIP Britain

If the setting is enabled, the postcode itself is separated into several zones.

The zipcodes are compared with these parts acoordingly. If the area of the outward part (letters) is the same, then it checks the ditrict and so on. This allows to handle such postcodes correctly (even in the rules with the possibility to compare them in the less than/greater than format).

Possible poblems

Please note that though in most cases our extension parses the UK codes correctly, if the users themselves make the mistakes with the post code input, it may lead to the possible problems. E.g., the inward code on the image above consists of sector (9) and the unit (DN). Some post codes may be without the sector, so if the customer by mistake writes EH129 DN instead of EH12 9DN, it may cause the incorrect interpretation by means of our extension.

This setting is disabled by default as it is used only if the postcode type is alphanumeric.

Advanced Postcode Validation: excessive data means postcode is valid. If this setting is enabled, the store owner can use the partial postcodes, such as only the area in the outward part of the postcode. This allows to minify the number of the postcodes for the rules. For instance, in the picture provided, the store owner can use only the EH part to cover all the possible options of the postocode in this area.

One and only one zone can be set for the address at a time. The usage of the location groups may lead to the situation, when some country is used in several groups. If this setting is Enabled, then it uses only the zone with the max priority and won't use any other zone with this country. If it is Disabled, then it will be matched any time.

Enable extended country select in the rule conditions. If enabled, the countries by region will be added to the rules conditions section.

Mageworx Shipping ZIP Validation

Enable advanced conditions for UK postcodes validation. If enabled, a bunch of new conditions (such as incode, outcode, area, district, sector, unit) will be added to the rules conditions section.

Mageworx Shipping ZIP Validation


Shipping Methods Settings

Mageworx Shipping Methods Settings

  • Rename shipping methods - this functionality allows you to rename any system shipping methods on the front-end.
  • Sort shipping carriers - this setting enables the functionality to sort the shipping carriers on the front-end according to the sort orders added for them.

Rates settings

  • Include Tax in Subtotal during shipping rates validation - this setting allows including the tax in the subtotal in the rate's conditions.
  • Max Countries Count (Rates Listing) - this setting allows you to limit the number of countries visible for the certain rates in the rates grid by default.
  • Max Regions Count (Rates Listing) - this setting allows you to limit the number of regions visible for the certain rates in the rates grid by default.

Mageworx Shipping Popup Configuration

Display Shipping Zones Popup If disabled, the popup will not be shown on the frontend.

Mageworx Shipping Popup Configuration

Display Only Country & Region Fields If disabled, the region image won't be shown.

Countries by Region Configuration

Mageworx Shipping Countries by Region

The Rates Configuration section includes the possibility to select the Country. For the store owner, it may be useful to select the whole cluster of countries, which is especially useful for the overseas shipping. The Magento uses the standard continents names like Africa or Europe. Unfortunately, out of the box, these regions are not populated with the corresponding countries. These regions are supported for the Rates configuration as they can be found in the Country tab there.

Mageworx Shipping Countries by Region

In the Countries by Region Configuration tab, the store owner can change the default countries for this feature.

Mageworx Shipping Countries by Region

More to come!

Though currently this functionality is provided only for the Rates and Rules configuration, we have plans to extend functionality to other settings as well.

Default Shipping Method

The extension provides the ability to introduce dozens of Shipping Carriers and hundreds of Shipping Methods. However, it may be useful to do some tests before adding all this stuff.

For this purpose, the extension provides the default Shipping Method that can be edited in STORES ⟶ Configuration ⟶ SALES ⟶ Shipping Method. It has the default price that can be modified by means of Shipping Rules and Restrictions.

GeoIP Extension

GeoIP Extension is used for the Pop-up zones. After the installation of the extension it should be set up.

If you wish the more precise detection, change the Database Type to City. Note that in case you wish to use the Country type (Default one), you'll still need to update the DB.

Log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ GeoIP Extensions.

store locator magento 2

Due to new MaxMind policy, you should register an account at MaxMinde site and generate a new license key for GeoLite2 database and enter it in the "MaxMind License Key" field.

Note

You should use the following option, when generating the licence key: "Generate a license key and config file for use with geoipupdate versions older than 3.1.1. This key will be stored in an unhashed format."

Note: You should save the configuration after adding a license key first. If you click the Update Database button before saving the configuration, it will update the database of the previous type with the previous license key.

Product shipping cost calculator

The Shipping Suite has the functionality to display the Estimate Shipping block on the product page to give your customers the opportunity to estimate the shipping prices and see all available shipping methods right from the product page. See Shipping Cost Calculator guide for more details.

Import/Export Carriers/Methods/Rates

The extension has the possibility to export the carriers, methods, rates and to import them. Log into the Magento Admin panel and go to SYSTEM ⟶ Data Transfer ⟶ Import/Export Carriers/Methods/Rates by MageWorx.

Mageworx Shipping Method Default

To check the structure of the CSV document, click the Export button or the Download Example CSV. The CSV may include all the three entities: Carriers, Methods and Rates in the single file. The column names in most cases may be logically assigned to these entities so we’ll observe them one by one.

csv "IE Type","Name","Title","Carrier Code","Active","Price","Store Ids" "carrier","Local Carrier","Local Carrier","localcarrier","1","0.00","[0]"

The IE Type determines the type of the full row, the values can be carrier, method or rate.

The Name is the system name of the carrier made for your reference.

The Title is the actual name of the Shipping Carrier, Shipping Method or Shipping Rate that the customer will see during checkout.

The Carrier Code is the system code for the carrier name. This field should be populated for the method as well for the extension to detect that the method should be connected to this carrier.

The Active column checks whether the Shipping Carrier, Shipping Method or Shipping Rate should be enabled, put the 0 value for the disabled entity.

The Price is the initial price of the Shipping Method or Shipping Rate. Note that for the correct calculation you should use all the prices in the base currency.

The next group of columns are mostly populated for the Shipping Methods.

csv "Replaceable Title","Code","Max Price Threshold","Min Price Threshold","Cost","Disabled Without Valid Rates","Multiple Rates Price","Allow Free Shipping" "1","localdelivery","0.0000","0.0000","0.0000","1","0","1" If the Replaceable Title value is 1, the Shipping Method’s name will replace the original Shipping Carrier name.

The Code is the system code for the Shipping Method name.

The Min and Max Price Threshold define the lowest and the highest possible shipping price values if multiple rates are applied.

The Cost is the actual cost of the shipping for the store owner.

The Disabled Without Valid Rates column checks whether the method should be hidden in case the shipping method doesn't contain any rates, put the 0 value to ignore this setting.

The Multiple Rates Price handles the situation when several rates are used at the same time. Put 0 for the rate with the max priority to be selected, 1 is for the rate with the max price, 2 states the rate with the min price and if you wish to sum up all the rates for the method, choose the 3.

The "Allow Free Shipping" column checks whether the method can rewrite the default free shipping rules (0) or not (1).

The next group of the values:

csv "Estimated Delivery Time Min","Estimated Delivery Time Max","Replaceable Estimated Delivery Time","Estimated Delivery Time Display Type","Show Estimated Delivery Time","Estimated Delivery Time Message" "1","2","1","0","1","Estimated delivery period is from {{min_days}} to {{max_days}}"

Bear in mind that the minimum and maximum time intervals can be set for the shipping rates as well. For the Estimated Delivery Time Display Type the values from the dropdown are matched as: 0 for the Days only (rounded); 1 for Hours only and 2 for Days with Hours.

The last group of columns should be populated for the rates.

csv "Rate Code","Priority","Rate Method Price","Country Id","Region","Region Id","Zip From","Zip To","Price From","Price To","Qty From","Qty To","Weight From","Weight To","Price Per Product","Price Per Item","Price Percent Per Product","Price Percent Per Item","Item Price Percent","Price Per Weight","Method Code" "heavyitems","0","0","US","MN","34","","","0","0","0","0","1","0","0","0","0","0","0","10","localdelivery"

The Rate Code is the technical name of the rate.

The bigger the number in the Priority column, the higher the priority. Includes both positive and negative numbers.

The Rate Method Price is allows either to overwrite the initial price of the metho(0) or to sum this value to the initial one(1).

To check the Country ID use this link and to detect the Region and Region ID you may use this method.

The next group of values are the conditional limits for Zip Codes, the price of the cart, the quantity and the weight of the products.

The prices rules and values have been explained prior in this manual.

B2B

The extension adds the extra attributes to the shipping rules available in Adobe Commerce B2B addon:
- company attributes
- company credits

In order to use these attributes you shoud install the following free compatiblity addons:
- for company attributes https://github.com/mageworx/module-shippingrules-company
- for company credits https://github.com/mageworx/module-shippingrules-company-credit

Hyvä theme

The extension out of the box has the integrations with Hyvä theme:

Note

The free compatibility addon must be installed. See this link for more details.

For developers

Logger usage

Notes

  1. The best way to solve this is to use the logger both on the cart and the checkout page, where the devivery costs are changed quite often. On the regular pages, such as a product grid or a product page, the possible changes may not be visible.

  2. The logger is initialized through requireJS. For this reason, it may not be available in the first seconds when page is being loaded. The logger is loaded from:

/pub/static/frontend/{theme_vendor}/{theme}/{locale}/MageWorx_ShippingRules/js/shippingRulesLogger.js

  1. To access the logger, one should perform this command from the browser console

js require('uiRegistry').get('shippingRulesLogger')

Entities

  1. Story - array, iterations of calculations occur on the server side as soon as available, stores the Info

  2. Info - an object, an iteration of calculations on the server side, contains the shipping Method

  3. Method - an object, its key is the method code carrier_method, contains the list of all the rules that can be applied to this method (valid in terms of the store and the customer group). If the required rule is not found in the list, one should first check whether the rule in question is enabled for this store and the customer matches the appropriate customer group.

  4. Rule - an object, its key is the rule_id. Contains the rule info. Possible properties and the values:

    • index (int) - the rule application precedence. The first applied rule has 0.

    • rule_id (string|int) - the id of the corresponding rule, same as the key.

    • sort_order (string|int) - the rule priority order, provided in the rule configuration.

    • valid (boolean) - checks whether rule validation has successfully passed. If the value is false, the rule was not applied.

    • processed (boolean) - checks whether the rule could edit some shiiping method (disable, modify its cost, etc)

    • disabled (boolean) - checks whether the rule has disabled the method

    • cost_overwrote (boolean) - checks whether the rule has modified the method's cost

    • invalid_shipping_method (boolean) - specifies whether the current method is adjusted or not

    • input_data (object) - the method data on the input (before applying the rule, should be the same as the output_data of the previous rule)

      • availability (boolean) - checks whether the method is enabled (false for disabled)

      • price (decimal) - method cost

    • output_data (object) - the method data on the output (after applying the rule, should be the same as the input_data of the next rule)

      • availability (boolean) - checks whether the method is enabled (false for disabled)

      • price (decimal) - method cost

      • detailed_actions (object) - the list of the actions applied to this rule with the details.

Methods

  1. Get all the history: js require('uiRegistry').get('shippingRulesLogger').getStory()
  2. Get the latest iteration of calculations: js require('uiRegistry').get('shippingRulesLogger').getInfo()
  3. Get the exact iteration of calculations (this example shows the first and the third iterations): js require('uiRegistry').get('shippingRulesLogger').getInfo(0) require('uiRegistry').get('shippingRulesLogger').getInfo(2)
  4. Forced history refresh (request to the server): js require('uiRegistry').get('shippingRulesLogger').refreshStory()
  5. Check what was the first rule to disable the method (this example shows the methods flatrate and length19testcarrier_firstclassdelivery): js require('uiRegistry').get('shippingRulesLogger').whenIsDisabled('flatrate_flatrate') require('uiRegistry').get('shippingRulesLogger').whenIsDisabled('length19testcarrier_firstclassdelivery') where flatrate and length19testcarrier are the carriers codes while flatrate и firstclassdelivery are the methods codes, so the structure is ('carriercode_methodcode').
  6. Check what was the first rule to disable the method for some Info (info_id is the number): js require('uiRegistry').get('shippingRulesLogger').whenIsDisabled('flatrate_flatrate', 1) require('uiRegistry').get('shippingRulesLogger').whenIsDisabled('length19testcarrier_firstclassdelivery', 5) where 1 and 5 are the info_ids. It can be specified by using the command getStory()
  7. Get the information for some method (by default it uses the last Info, if it is not specially provided in the end): js require('uiRegistry').get('shippingRulesLogger').getMethodInfoByCode('length19testcarrier_firstclassdelivery') require('uiRegistry').get('shippingRulesLogger').getMethodInfoByCode('flatrate_flatrate', 1) second request checks the info_id 1.
  8. Forced history refresh (request to the server): js require('uiRegistry').get('shippingRulesLogger').refreshStory()

  9. Get the amount difference for some method that is modifyed by some rules: js require('uiRegistry').get('shippingRulesLogger').showDiff('flatrate_flatrate', 21, 24) where 21 and 24 are the rule_id s.

  10. It is also possible to use the Info parameter (by default it uses the last Info, if it is not specially provided in the end): js require('uiRegistry').get('shippingRulesLogger').showDiff('flatrate_flatrate', 21, 24, 4) where 21 and 24 are the rule_id s, 4 is the info_id

Got Questions?

MageWorx offers FREE lifetime support and updates for any extension developed for Magento. Need help with the extensions? Feel free submit a ticket from https://www.mageworx.com/support/ 



MageWorx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.