Back to Top

Shipping Restriction for Magento 2

Updated 15 March 2024

Introduction

Shipping Restriction for Magento 2 extension facilitates the admin to create shipping condition rules to block certain methods of the shipping carrier. The extension supports various limitation criteria based on customer group and store view.

Furthermore, the admin can restrict the shipping method based on the payment method, cart attribute, shipping postcode, etc.

Watch the video tutorial below to understand the extension workflow:

Feature List

  • Allows admin to block certain shipping methods.
  • Admin can add rules to restrict the shipping method.
  • Rules are customizable based on the requirement.
  • Admin can add multiple shipping restriction rules.
  • Make use of customer groups and store views as a restriction base.
  • Admin can restrict the shipping method based on the payment method, cart attribute, shipping postcode, etc.
  • Option to activate the restriction for admin-end.
  • The admin can show or hide a restriction message to the user.
  • Allows admin to compose the restriction message.
  • Disable or allow shipping with coupon/discount.
  • Shipping restrictions get applied on the frontend and admin end.

Installation

Customers will get a zip folder. Then they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder.

You need to transfer this app folder into the Magento2 root directory on the server as shown below:

Searching for an experienced
Magento 2 Company ?
Find out More
Installation

After the successful installation, you have to run these commands in the Magento2 root directory.

First Command –

php bin/magento setup:upgrade

Second Command –

php bin/magento setup:di:compile

Third Command –

php bin/magento setup:static-content:deploy

Cache Management

After running the commands, you have to flush the cache from the Magento admin panel by navigating through System > Cache management as shown below:

Cache Management

Language Translation

For translating the module language, navigate through src/app/code/Webkul/ShippingRestrictions/i18n/ and edit the en_US.csv file.

Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

Then upload it to the path src/app/code/Webkul/ShippingRestrictions/i18n/ where the Magento2 is installed on the server.

Hence, the module gets translated into the Arabic Language. It supports both RTL and LTR languages:

Multilingual

Shipping Restriction Configuration

Magento2 Shipping Condition Rules -  Configuration
  • Enable/Disable – Allows admin to enable/disable the module.
  • Shipping Restriction Message – If enabled then error message will be visible on frontend when the shipping method is restricted.

Shipping Condition Rules

Furthermore, this section allows the admin to manage customizable rules to navigate through – Shipping Restrictions => Manage Rules. For more details check-below given image:

Manage Shipping Condition Rules

Magento2 Shipping Condition Rules - manage_rules

Add Shipping Condition Rules

Magento2 Shipping Condition Rules - Shipping_Management

Rule Information

  • Rule Name – First of all write down the rule name.
  • Description – Then put the description.
  • Active – Now select the status as per the requirement.
  • Customer Group – Also choose shipping restriction based on customer group
  • Store View – Additionally, restrict shipping based on store view
  • Shipping Methods – Now select the shipping restriction to restrict.
  • Active for Admin – Then activate shipping restriction for admin
  • Restriction Message – Further compose restriction message to show
  • Priority – In the end, set the preference to get the rules applied.

Discount Coupons

Consequently, this section defines the discount coupons to apply the rule only with. Moreover, select the discount coupons do not apply the rule with.

Magento2 Shipping Condition Rules - Discount Coupons

Conditions

This section allows admin to apply the rule only if the defined conditions are met. Furthermore, the condition gird contains product attribute combination, product subselection, conditions combination, and cart attributes.

Cart attribute contains subtotal, total item quantity, total weight, payment method, shipping postcode, Country, province, and region-wise shipping restriction)

Magento2 Shipping Condition Rules - condition_explain

Shipping Condition Rules Create New Order

Whenever the admin creates an order using Shipping Condition Rules extension, shipping method functions as shown in the below-given image:

When Shipping Condition Rule Disabled

Magento 2 Shipping Condition Rules - enabled

When Shipping Rule Applied

Magento 2 Shipping Condition Rules -  Shipping Restriction Message

Storefront Function

Shipping Condition Rules When Restricted

Magento 2 Shipping Condition Rules - front_end

When Rules Not Applied

Magento 2 Shipping Condition Rules - front_end_enabled

Support

Thus, that’s all for the Shipping Restriction for Magento 2.

If you face any issue, feel free to add a ticket at our HelpDesk system.

Current Product Version - 5.0.2

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


2 comments

  • Sheba
    • Neelesh Singh (Moderator)
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content