14 class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
49 \
Magento\Backend\Helper\Data $backendHelper,
50 \
Magento\OfflineShipping\Model\
ResourceModel\Carrier\Tablerate\CollectionFactory $collectionFactory,
51 \
Magento\OfflineShipping\Model\Carrier\Tablerate $tablerate,
54 $this->_collectionFactory = $collectionFactory;
55 $this->_tablerate = $tablerate;
56 parent::__construct($context, $backendHelper,
$data);
67 $this->setId(
'shippingTablerateGrid');
68 $this->_exportPageSize = 10000;
79 $this->_websiteId = $this->_storeManager->getWebsite(
$websiteId)->getId();
90 if ($this->_websiteId ===
null) {
91 $this->_websiteId = $this->_storeManager->getWebsite()->getId();
104 $this->_conditionName =
$name;
131 return parent::_prepareCollection();
143 [
'header' =>
__(
'Country'),
'index' =>
'dest_country',
'default' =>
'*']
148 [
'header' =>
__(
'Region/State'),
'index' =>
'dest_region',
'default' =>
'*']
153 [
'header' =>
__(
'Zip/Postal Code'),
'index' =>
'dest_zip',
'default' =>
'*']
157 $this->
addColumn(
'condition_value', [
'header' =>
$label,
'index' =>
'condition_value']);
159 $this->
addColumn(
'price', [
'header' =>
__(
'Shipping Price'),
'index' =>
'price']);
161 return parent::_prepareColumns();
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, \Magento\OfflineShipping\Model\ResourceModel\Carrier\Tablerate\CollectionFactory $collectionFactory, \Magento\OfflineShipping\Model\Carrier\Tablerate $tablerate, array $data=[])
if(!isset($_GET['name'])) $name