コード例 #1
0
 /**
  * @return $this
  */
 public function afterSave()
 {
     /** @var \Magento\OfflineShipping\Model\ResourceModel\Carrier\Tablerate $tableRate */
     $tableRate = $this->_tablerateFactory->create();
     $tableRate->uploadAndImport($this);
     return parent::afterSave();
 }
コード例 #2
0
 /**
  * @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);
 }