To overide that file you need to do following things.
- create
di.xml
file at following location.
app\code\Vendor\Extension\etc\di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\OfflineShipping\Model\Carrier\Freeshipping" type="Vendor\Extension\Model\Carrier\Freeshipping" />
</config>
- now create the
Freeshipping.php
at following location.
app\code\Vendor\Extension\Model\Carrier\Freeshipping.php
<?php
namespace Vendor\Extension\Model\Carrier;
use Magento\Quote\Model\Quote\Address\RateRequest;
class Freeshipping extends \Magento\OfflineShipping\Model\Carrier\Freeshipping
{
public function collectRates(RateRequest $request)
{
// Do your logic here
}
}
CarrierTitle
andCarrierTitle
bank?