/** * @return $this */ public function afterSave() { /** @var \Magento\OfflineShipping\Model\ResourceModel\Carrier\Tablerate $tableRate */ $tableRate = $this->_tablerateFactory->create(); $tableRate->uploadAndImport($this); return parent::afterSave(); }
/** * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return array|bool */ public function getRate(\Magento\Quote\Model\Quote\Address\RateRequest $request) { return $this->_tablerateFactory->create()->getRate($request); }