Customers who qualify for free shipping will also have paid shipping option shown, which may be confusing.
Is there a way to hide other shipping methods when free shipping method is available?
http://www.magestore.com/magento-2-tutorial/how-to-set-up-free-shipping-rules-in-magento-2/
this might help
@lgarridoj wrote:Customers who qualify for free shipping will also have paid shipping option shown, which may be confusing.
Is there a way to hide other shipping methods when free shipping method is available?
Hi,
Did you get any answer on this?
Did you create a new module?
Hello @pisha,
Magento\Quote\Model\ShippingMethodManagement.php
public function getList($cartId)
{
............
$free=false;
$freeOutput=[];
foreach ($shippingRates as $carrierRates) {
foreach ($carrierRates as $rate) {
if($rate->getCode()=='freeshipping')
{
$free=true;
$freeOutput[] = $this->converter->modelToDataObject($rate, $quote->getQuoteCurrencyCode());
}else{
$output[] = $this->converter->modelToDataObject($rate, $quote->getQuoteCurrencyCode());
}
}
}
if($free==false)
{
return $output;
}else{
return $freeOutput;
}
}If work then you need to create plugin after afttergetList/aroundGetList() and implement same logic.
If my idea work then mark as solution.