Live Demo Buy Now

Magento 2 Payment & Shipping Restriction

Using Magento 2 Payment & Shipping Restriction module, the admin can assign the shipping and payment methods to products and the categories.

Sometimes the admin wants to restrict few of the shipping and payment methods for some products and category types. So, instead of completely disabling the shipping and payment methods for the store, restrict the shipping and payments methods which the admin doesn’t wish to use for particular products and categories.

During the checkout process, the customer can view the assigned shipping and payment methods to place an order.

NoteThe extension will not create any new shipping and payment method for you.

Features

  • The admin can enable or disable the module as per convenience.
  • Assign specific shipping methods to a product.
  • Assign specific payment methods to a product.
  • Restrict the payment and shipping methods for the product types – Simple, Configurable, Virtual and downloadable.
  • Assign specific shipping methods to product categories.
  • Assign specific payment methods to product categories.
  • Assign different shipping and payment methods to various products and category types.
  • Only assigned shipping and payment methods available while checkout.
  • Restrict the shipping and payment for the products and categories which were existing before the installation of this module by editing them again.

Installation

Customers will get a zip folder and 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.

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

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

Multi-Lingual Configuration

For Multilingual support, please navigate to Store>Configuration>General >Locale Options. And select your desired language from the Locale option.

Module Configuration

After the module installation, the admin can configure the module settings by navigating to the Stores -> Settings -> Configuration -> Webkul -> Shipping and Payment Restriction as shown below.

Here, the admin will:

  • Enable Module on Frontend – Set the option to Yes if want to display the restricted shipping and payment methods only on the frontend. Else set the option to No if want to display all the shipping and payment methods.

And, lastly hit the Save Config button to save the configuration successfully.

Category – Assign Shipping & Payment Methods

The admin can restrict the different payment and shipping methods for each category as shown below.

On the category edit page, the admin will have two fields:

  • Select Shipping Method- Choose the shipping methods wants to enable for that particular category.
  • Select Payment Method- Choose the payment methods wants to enable for that particular category.

And, lastly hit the Save button to save the category successfully.

Note:

  • The admin needs to configure the payment and shipping methods for each category individually.
  • The admin can configure the different payment and shipping methods for parent and the child category.
  • The admin can restrict the shipping and payment for the categories which were existing before the installation of this module.

Product – Assign shipping & Payment Methods

The admin can even restrict the different payment and shipping methods for each product as shown below.

On the product edit page, the admin will have two fields:

  • Select Shipping- Choose the shipping methods wants to enable for that particular product.
  • Select Payment- Choose the payment methods wants to enable for that particular product.

And, lastly hit the Save button to save the product successfully.

Note:

  • The admin needs to configure the payment and shipping methods for each product individually.
  • The admin can restrict the payment and shipping methods for the product types – Simple, Configurable, Virtual and downloadable.
  • The admin can restrict the shipping and payment for the products which were existing before the installation of this module.

Front-End

Now at the front-end, the customer can view the restricted shipping and payment methods while placing the order. On the cart page, the customer can view the enabled shipping methods only.

And accordingly, the customer will select the shipping method when proceeding further.

While making the payment, the customer can choose the payment method from the enabled ones only.

The module has a two-way restriction – One on product and another one on the category. If the admin has not restricted any shipping and payment methods on products then, the control will automatically check for restriction on the category of that product.

If no restriction made on the category as well. Then, in that case, all the active shipping and payment methods will be available at checkout.

Case 1: What if a single product in the cart belongs to multiple categories?

The shipping and payment restriction made on the product has a higher priority than that of categories. So, in this case, firstly it would check the shipping and payment method assigned to the product.

If not assigned then it will automatically check for restriction on the categories of that product and does the union of payment and shipping methods of the multiple categories. Union of shipping and payment methods will be displayed at the checkout page.

Case 2: What if the shopping cart has multiple products(each product belongs to multiple categories) with different shipping and payment method enabled?

The shipping and payment restriction made on the product has a higher priority than that of categories. So, in this case, firstly it would check the common payment and shipping methods among the multiple products in the cart and accordingly will display them at the checkout.

If no shipping & payment method assigned to products then it will automatically check for shipping & payment method restriction on the categories. For each product, it does the union of payment and shipping methods of the categories it belongs to. And, then will check the common payment and shipping methods among the multiple union sets created for each product. And those common shipping and payment methods will be displayed at the checkout page.

Case 3: What if the enabled shipping and payment methods don’t work for the location from where the customer is placing the order?

In this case also, it would first check the assigned shipping and payment method to the product which will be supporting the customer pin code and accordingly will display them on the checkout.

If couldn’t find the supporting one, then it will automatically check the assigned shipping and payment method to the category which will be supporting the customer pin code and accordingly will display them on the checkout.

If then also couldn’t find the supporting one, then all the active shipping and payment methods supporting the customer pin code will be available at the checkout.

That’s all for the Magento 2 Payment & Shipping Restriction plugin. Still, have any issue, feel free to add a ticket and let us know your views at webkul.uvdesk.com

Current Product Version - 2.0.0

Supported Framework Version - 2.0.x, 2.1.x, 2.2.x

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close

Index