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