Fill the form & Get Installation Support

    If you want restrict customer to checkout based on your min product amount, then here are the steps to create module.

    Here we are using Magemonkeys as Vendor name and CheckoutRestriction as the name of a module. You can change this according to your Vendor and Module name.

    Step 1: Create Registration

    Create registration.php file in the app/code/Magemonkeys/CheckoutRestriction folder with the following code.

    Step 2: Create a module

    Create a module.xml file in the app/code/Magemonkeys/CheckoutRestriction/etc folder with the following code.

    Step 3: Create a helper

    Create a Restriction.php file in the app/code/Magemonkeys/CheckoutRestriction/Helper folder with the following code.

    Step 4: Create a Plugin file

    Create a Restrict.php file in the app/code/Magemonkeys/CheckoutRestriction/Plugin/Checkout/Controller with the following code.

    Step 5: Override checkout_cart_item_renderers.xml

    Create a checkout_cart_item_renderers.xml file in the app/code/Magemonkeys/CheckoutRestriction/view/frontend/layout folder with the following code.

    Step 6: Override default.phtml

    Create a default.phtml file in the app/code/Magemonkeys/CheckoutRestriction/view/frontend/templates/cart/item folder with the following code.

    After adding above files here are some extra step

    1. You need to create product attribute from admin and assign it to attribute set.

    2. Add product min amount to validate.

    Note: Attribute code must be “min_order_allow_amount”

    Here is the screenshot which shows error message for product min amount.

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

      Recent Articles

      Author Info

      Hire B. Darji

      Get a Free Quote


        mage Monkeys

        Let’s initiate a discussion!!

        Book a call

        Let our Magento expert connect to discuss your requirement.

          We offer Magento
          certified developers.

          Our Magento clientele
          is 500+.

          We sign NDA for the
          security of your projects.

          We’ve performed 100+
          Magento migration projects.

          Free quotation
          on your project.

          Three months warranty on
          code developed by us.