cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure a shipping method based on product weight

How to configure a shipping method based on product weight

Hello...

 

I need to be able to configure Magento 2 so that shipping costs depend only on weight of the product, not on distance.

 

I only need to have this configuration: 

 

For A kgs in weight, I need to assign a shipping prce of $ X

For B kgs in weight I need  to assign a shipping price of $ Y

 

Fortunately, At the moment, I have only 2 products with different weights each.

 

How can I do it?

 

Thanks

Jaime

Tags (1)
1 REPLY

Re: How to configure a shipping method based on product weight

Use the getPackageWeight()  method of the \Magento\Shipping\Model\Shipment\Request class.
How are the setPackageWeight() and getPackageWeight() methods of the \Magento\Shipping\Model\Shipment\Request class used? https://mage2.pro/t/1219