Menu Close
    Convert your store into Magento 2 Multi Vendor Marketplace

    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.

    Note:

    •  The extension will not create any new shipping and payment method for you.
    •  The module functionality will not work for the order created form the admin panel.

    Wonder How The Module Works? Watch the below Video

    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.

    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

    Fourth Command –

    php bin/magento indexer:reindex

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

    Flush Magento Cache

    Multi-Lingual Configuration

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

    change language

    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.

    webkul-Magento-2-Payment & Shipping-Restriction Module Confugration

    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.

    category

    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.
    • Further, the admin can configure the different payment and shipping methods for parent and the child category.
    • The admin can also 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.

    product page

    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.
    • Moreover, 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.

    Webkul-Magento-2-Payment-&-Shipping-Restriction-Manage Shipping and Payment-Mapping-demo22

    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.

    add mapping

    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.

    cart

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

    shipping

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

    payment

    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.
    • The module supports CheckOut with Multiple Address as well.
    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. Secondly, 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 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. Moreover, 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.

    Case 4: What if two or more products are added in the cart, each having separate shipping & payment methods mapped on it?

    Let’s suppose there are two product X and product Y. For the product X, enabled shipping methods are (Free shipping, Table rate & Flat rate ) and (Check/Money Order, Bank Transfer Payment & Cash on Delivery ) are its selected payment methods.

    Whereas for the product, Y (Flat rate and Free shipping) are the enabled shipping methods and (Check/Money Order, Bank Transfer Payment, Cash on Delivery & PayPal Billing Agreement ) are its selected payment methods. Additionally in the backend Free shipping has been mapped with COD.

    As a result, when a customer for an instance add these two products X and Y into his shopping cart only the shipping rates which are commonly present for both the products will be visible to the customer, in this case, (Flat rate and Free shipping). Further, consider that the customer opted for Free shipping since it is originally mapped with the COD. Therefore only cash on delivery will be visible to the customer. Or if the customer picks Fixed rate shipping and note since we haven’t mapped this with any of the payment methods. Therefore, here all the common payment methods will be visible to the customer. Which are (Check/Money Order, Bank Transfer Payment & Cash on Delivery ) for this case.

    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 - 4.0.0

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

    Blog Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x
    • Version 2.0.x, 2.1.x, 2.2.x, 2.3.x, 2.4.x
    • Version 2.0.x , 2.1.x , 2.2.x , 2.3.x
    . . .
    Discuss on Helpdesk

    Leave a Comment

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


    Be the first to comment.

    Back to Top