Web Analytics

Fill the form & Get Installation Support





    Restrict Payment Method based on Shipping Method

    I need Cash On Delivery payment method when the customer selects a Store Pick up Shipping method during the checkout process. You can do this using “payment_method_is_active“ event:

    Create an events.xml file at:
    /app/code/Vendor/Modulename/etc/. Add the following code in this file:

    And create Paymentactive.php file at
    Vendor/ModuelName/Observer/path. Add the following code in this file:

    You need to replace “storepickup_storepickup” with your shipping code and “cashondelivery” or “ paypal_express” with your payment method code.

    Fill the below form if you have any Magento programming need.





      Recent Articles

      Author Info

      Author Image

      Hire A. Patel

      Get a Free Quote





        Connect With Us