Magento 2.1.

How can I limit the total cart/order weight so it does not exceed 7 KG?

I use "Table Rates" shipping method


1 Answer 1


Looking at the Cart model in magento 2.1 (/vendor/magento/module-checkout/Model/Cart.php)

We can see that the Save() method dispatches 2 events, checkout_cart_save_before and checkout_cart_save_after.

I would recommend that you create a plugin for checkout_cart_save_before where you would check the total weight of the quote, if it exceeds your maximum throw a magento ValidatorException with a message to the customer, otherwise proceed to save method.

  • Better use sales_quote_save_before. Supports APIs Commented Apr 7, 2021 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.