0

I've a custom shipping module which has a drop-down list options for choosing an option to add some cost for shipping amount, i only successfully to use preference to override Magento\Quote\Model\Quote\Address\Total\Shipping

in the collect method:

$total->setBaseShippingAmount($rate->getPrice()+$fee);
$total->setShippingAmount($amountPrice+$fee);

is there any better practice which i can make use?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.