Menu Close
    Hire us Request quote Reading list Switch to dark mode

    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.
    • The admin can map the shipping and payment methods.
    • 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.
    • The Mapped shipping and payment method should be selected else there will be no payment method displayed for the mapped shipping selected.

    Payment Shipping Mapping

    The admin can map the payment method with the shipping methods by navigating to payment shipping mapping section and the following mapping list will be displayed as shown in the image below.

    The admin can create new mapping from the Add Mapping section and select the desired shipping method and payment method that is needed to be saved as shown in the image below.

    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 allows shipping and payment method restriction on the product and on the category. Note:

    • 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 is applied to the category as well, 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, it first checks the shipping and payment method assigned to the product based on the customer’s location and accordingly displays them at checkout. If for a product, restricted shipping and payment method is not applicable as per the customer’s location, then, the shipping and payment method restriction of the category will be displayed. If the shipping & payment restriction is applicable to a product, then, payment and shipping restriction is never applicable to that category based product. Let us understand this through an example which is given below. For instance, there is a product named Product-1 which needs to be shipped to New York and Germany. The shipping and payment method mapping is defined for Product-1 is USPS and COD, respectively. One can see that the USPS shipping shall be is applicable to Product-1 which needs to be shipped to New York. At the same time, if the same product, Product-1 is to be shipped to Germany, and if by any chance, the USPS shipping is not applicable, then there will be no shipping and payment methods applicable for the location Germany on the checkout page. 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 - 3.0.0

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

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close