Getting Started

Welcome to the Shipping Rule documentation. Whether you are a new or an advanced user, you can find some useful information here.

First of all, we recommend to check the following link:

Second of all, proceed then with Quick Start, which will guide you through creating your own Shipping Rule.

How to install the extension

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.
  4. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_ShippingRule Mirasvit_ShippingArea to enable the extensions.
  5. Run command php -f bin/magento setup:upgrade to install the extension.
  6. Run command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Quick Start

The Shipping Rule for Magento 2 extension is designed to help you organized delivery methods.

For more information please visit this section Shipping Rule.



Shipping Rules

Adding a shipping rule

In your Magento admin panel in the left column, locate the Stores button. Click on it and select Shipping Rule.

image

Add a new rule using button Add New Shipping Rule.

When adding a new shipping rule, include general information such as the name of the rule. Select shipping methods for which this rule should be applied.

image

Set the priority of the rule execution. The lower the number, the higher is its priority. Specify if it is necessary to stop the execution of other rules when this rule is applied.

image

Get flexible shipping rates by overriding default delivery methods fees. Set individual shipping rules for orders.

Setting rule conditions

In the Applying Conditions section, you can configure rules based on the following cart attributes:

  • Subtotal

  • Subtotal excluding tax

  • Total items quantity

  • Total order weight

  • Payment method

  • Shipping method

  • Shipping postcode

  • Shipping region

  • Shipping state/province

  • Shipping country

You can also create a use product attribute combination and product sub-selection as conditions for the rule.

image

Use extra conditions such as day of the week, time of the day, Shipping Area.

Example To create a rule which is applied when there is 1 item in a cart and the customer makes order on Wednesday, add the following conditions:

  • Total items quantity is 1

  • Day of week is one of  Wednesday

Setting rule visibility

Shipping rules can be applied to store views and customer groups. You can check multiple store views and user groups.

image

Setting shipping rates and thresholds

In the sub-menu Rates and Thresholds, set the parameters for overriding the default shipping rate of the chosen shipping method.

image

Fee Calculation defines how the default shipping rate will be overridden:

  • Re-calculate shipping fee. The default shipping rate is replaced by your value.

  • Add extra fee. Your value is added to the default shipping rate.

  • Subtract extra fee. Your value is subtracted from the default shipping rate.

The Rate types sets numerical value for Fee Calculation option. Such rate types are available:

  • Fixed rate per order
  • Rate per product
  • Rate per unit of weight
  • Percent of the product price
  • Percent of the base rate

Set min and max thresholds to specify limits when the shipping rate is applied.

Shipping Area

Shipping Area is an extra condition you can apply to shipping rule. This options allows to spend less time creating similar shipping rules by for deliveries to different locations. Group a number of geographical shipping zones as one.

In your Magento admin panel find in the left column Stores button. Click on it and select Shipping Area.

Press button Add New Shipping Area to create a new one. Set the name for this area and activate it.

image

Set Applying Conditions for this area, for example shipping postcode, region, country, etc.

You can use the created Shipping Area as an extra condition for shipping rules.

How to upgrade extension

To upgrade the extension follow these steps:

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Run command composer require mirasvit/module-shipping-rule:* --update-with-dependencies to update current extension with all dependencies.

    Note

    In some cases the command above is not applicable, it's not possible to update just current module, or you just need to upgrade all Mirasvit modules in a bundle. In this case command above will have no effect.

    Run instead composer update mirasvit/* command. It will update all Mirasvit modules, installed on your store.

  4. Run command php -f bin/magento setup:upgrade to install updates.
  5. Run command php -f bin/magento cache:clean to clean the cache.
  6. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Disabling the Extension

Temporarily Disable

To temporarily disable the extension please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run command php -f bin/magento module:disable Mirasvit_ShippingRule Mirasvit_ShippingArea to disable the extension.
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Removing the Extension

To uninstall the extension, please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command composer remove mirasvit/module-shipping-rule to remove the extension.
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Change Log

1.0.5

(2021-10-22)

Fixed

  • Display of Shipping Methods depend on Store View

1.0.4

(2021-07-02)

Fixed

  • An error "Infinite number of shipping methods"

1.0.2

(2021-05-17)

Improvement

  • Added the ability to select attribute as a weight attribute

1.0.1

(2021-04-05)

Fixed

  • Minor fixes

1.0.0

(2021-03-29)

Features

  • Initial release