Hello, I need to have a shipping method that only take weight into account, independent of distance.
Is it possible in Magento 2?
For example, the standard USPS shipping method takes a product weight into account, and the standard Flat Rate shipping method is independent of a distance.
So, there are no technical restrictions nor to take weight into acccount, nor to be independent of a distance.
but how can I configure it? I have seen about USPS but it is a shipping method present in USA with defined costs.
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.
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