Getting Started

Welcome to the Shipping Restriction 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 Restriction.

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_ShippingRestriction 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 Restriction for Magento 2 extension is designed to help you organized delivery methods.

For more information please visit this section Shipping Restriction.



Shipping Restrictions

Get a well-developed shipping policy set up in your store. Adapt delivery methods available in your store to your business and regulatory requirements. Provide customers with optimal delivery methods based on order and cart attributes, and shipping location.

Adding a shipping restriction rule

In your the Magento admin panel sidebar, find the Stores button. Click on it and select Shipping Restrictions.

image

Add a new restriction rule using the button Add New Restriction.

When adding a new shipping restriction rule, put in general information such as the name of the rule. Select delivery carriers and their shipping methods for which this rule is applied. Activate the rule execution.

image

Type a notification in the field Restriction message for the customers to be informed on the unavailability of the specified shipping methods. Leave the field blank to hide those shipping methods on a checkout page without any notice.

image

Setting restriction conditions

In the section Applying Conditions, you can configure restiction rules based on the 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 use a 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, and Shipping Area.

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

  • Total items quantity is 1

  • Day of week is Wednesday

Example 2 To restrict a shipping method for single porcelain item of 50 kilograms, make a new rule and specify the following conditions:

  • Total Weight is 50

  • Product attribute combination:

    • Material contains porcelain

Setting rule visibility

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

image

Shipping Area

Shipping Area is an extra condition you can apply to the shipping restriction rule. This option allows you to spend less time creating identical restriction conditions for deliveries to different locations. Group a number of geographical shipping zones as one.

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

image

Press the 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 the shipping postcode, region, country, etc.

You can use the created Shipping Area as an extra condition for shipping restriction 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-restriction:* --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_ShippingRestriction 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-restriction to remove the extension.
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Change Log

1.0.2

(2022-01-19)

Fixed

  • Error "Infinite loop detected"

1.0.1

(2021-06-11)

Fixed

  • An issue when impossible to select category in the conditions

1.0.0

(2021-03-23)

Improvements

  • Initial Release