protected function _prepareColumns() { $this->addColumn('product_id', array('header' => $this->__('Product ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'entity_id', 'frame_callback' => array($this, 'callbackColumnProductId'))); $this->addColumn('name', array('header' => $this->__('Product Title / Product SKU'), 'align' => 'left', 'type' => 'text', 'index' => 'name', 'filter_index' => 'name', 'frame_callback' => array($this, 'callbackColumnProductTitle'), 'filter_condition_callback' => array($this, 'callbackFilterTitle'))); $this->addColumn('sku', array('header' => $this->__('SKU'), 'align' => 'left', 'width' => '150px', 'type' => 'text', 'index' => 'amazon_sku', 'filter_index' => 'amazon_sku', 'frame_callback' => array($this, 'callbackColumnAmazonSku'))); $this->addColumn('general_id', array('header' => $this->__('ASIN / ISBN'), 'align' => 'left', 'width' => '140px', 'type' => 'text', 'index' => 'general_id', 'filter_index' => 'general_id', 'frame_callback' => array($this, 'callbackColumnGeneralId'))); $this->addColumn('online_qty', array('header' => $this->__('QTY'), 'align' => 'right', 'width' => '70px', 'type' => 'number', 'index' => 'online_qty', 'filter_index' => 'online_qty', 'frame_callback' => array($this, 'callbackColumnAvailableQty'), 'filter' => 'Ess\\M2ePro\\Block\\Adminhtml\\Amazon\\Grid\\Column\\Filter\\Qty', 'filter_condition_callback' => array($this, 'callbackFilterQty'))); $priceColumn = array('header' => $this->__('Price'), 'align' => 'right', 'width' => '110px', 'type' => 'number', 'index' => 'min_online_price', 'filter_index' => 'min_online_price', 'frame_callback' => array($this, 'callbackColumnPrice'), 'filter_condition_callback' => array($this, 'callbackFilterPrice')); // TODO // if (Mage::helper('M2ePro/Component_Amazon_Repricing')->isEnabled()) { // $priceColumn['filter'] = 'Ess\M2ePro\Block\Adminhtml\Amazon\Grid\Column\Filter\Price'; // } $this->addColumn('online_price', $priceColumn); $this->addColumn('status', array('header' => $this->__('Status'), 'width' => '155px', 'index' => 'amazon_status', 'filter_index' => 'amazon_status', 'type' => 'options', 'sortable' => false, 'options' => array(\Ess\M2ePro\Model\Listing\Product::STATUS_UNKNOWN => $this->__('Unknown'), \Ess\M2ePro\Model\Listing\Product::STATUS_LISTED => $this->__('Active'), \Ess\M2ePro\Model\Listing\Product::STATUS_STOPPED => $this->__('Inactive'), \Ess\M2ePro\Model\Listing\Product::STATUS_BLOCKED => $this->__('Inactive (Blocked)')), 'frame_callback' => array($this, 'callbackColumnStatus'))); // TODO // if (Mage::helper('M2ePro/Module')->isDevelopmentMode()) { // $this->addColumn('developer_action', array( // 'header' => $this->__('Actions'), // 'align' => 'left', // 'width' => '100px', // 'type' => 'text', // 'renderer' => 'M2ePro/adminhtml_listing_view_grid_column_renderer_developerAction', // 'index' => 'value', // 'filter' => false, // 'sortable' => false, // 'js_handler' => 'ListingGridHandlerObj' // )); // } return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('product_id', array('header' => $this->__('ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'entity_id', 'filter_index' => 'entity_id', 'frame_callback' => array($this, 'callbackColumnProductId'))); $this->addColumn('name', array('header' => $this->__('Title'), 'align' => 'left', 'type' => 'text', 'index' => 'name', 'filter_index' => 'name', 'frame_callback' => array($this, 'callbackColumnProductTitle'))); $tempTypes = $this->type->getOptionArray(); unset($tempTypes['virtual']); $this->addColumn('type', array('header' => $this->__('Type'), 'align' => 'left', 'width' => '90px', 'type' => 'options', 'sortable' => false, 'index' => 'type_id', 'filter_index' => 'type_id', 'options' => $tempTypes)); $this->addColumn('is_in_stock', array('header' => $this->__('Stock Availability'), 'align' => 'left', 'width' => '90px', 'type' => 'options', 'sortable' => false, 'index' => 'is_in_stock', 'filter_index' => 'is_in_stock', 'options' => array('1' => $this->__('In Stock'), '0' => $this->__('Out of Stock')), 'frame_callback' => array($this, 'callbackColumnIsInStock'))); $this->addColumn('sku', array('header' => $this->__('SKU'), 'align' => 'left', 'width' => '90px', 'type' => 'text', 'index' => 'sku', 'filter_index' => 'sku')); $store = $this->_getStore(); $this->addColumn('price', array('header' => $this->__('Price'), 'align' => 'right', 'width' => '100px', 'type' => 'price', 'filter' => 'Ess\\M2ePro\\Block\\Adminhtml\\Magento\\Grid\\Column\\Filter\\Price', 'currency_code' => $store->getBaseCurrency()->getCode(), 'index' => 'price', 'filter_index' => 'price', 'frame_callback' => array($this, 'callbackColumnPrice'))); $this->addColumn('qty', array('header' => $this->__('QTY'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'qty', 'filter_index' => 'qty', 'frame_callback' => array($this, 'callbackColumnQty'))); $this->addColumn('visibility', array('header' => $this->__('Visibility'), 'align' => 'left', 'width' => '90px', 'type' => 'options', 'sortable' => false, 'index' => 'visibility', 'filter_index' => 'visibility', 'options' => $this->visibility->getOptionArray())); $this->addColumn('status', array('header' => $this->__('Status'), 'align' => 'left', 'width' => '90px', 'type' => 'options', 'sortable' => false, 'index' => 'status', 'filter_index' => 'status', 'options' => $this->status->getOptionArray(), 'frame_callback' => array($this, 'callbackColumnStatus'))); if (!$this->_storeManager->isSingleStoreMode()) { $this->addColumn('websites', array('header' => $this->__('Websites'), 'align' => 'left', 'width' => '90px', 'type' => 'options', 'sortable' => false, 'index' => 'websites', 'filter_index' => 'websites', 'options' => $this->websiteFactory->create()->getCollection()->toOptionHash())); } return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('product_id', array('header' => $this->__('Product ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'entity_id', 'frame_callback' => array($this, 'callbackColumnProductId'))); $this->addColumn('name', array('header' => $this->__('Product Title / Product SKU / eBay Category'), 'align' => 'left', 'type' => 'text', 'index' => 'online_title', 'frame_callback' => array($this, 'callbackColumnTitle'), 'filter_condition_callback' => array($this, 'callbackFilterTitle'))); $this->addColumn('ebay_item_id', array('header' => $this->__('Item ID'), 'align' => 'left', 'width' => '100px', 'type' => 'text', 'index' => 'item_id', 'frame_callback' => array($this, 'callbackColumnEbayItemId'))); $this->addColumn('available_qty', array('header' => $this->__('Available QTY'), 'align' => 'right', 'width' => '50px', 'type' => 'number', 'index' => 'available_qty', 'sortable' => true, 'filter' => false, 'frame_callback' => array($this, 'callbackColumnOnlineAvailableQty'))); $this->addColumn('online_qty_sold', array('header' => $this->__('Sold QTY'), 'align' => 'right', 'width' => '50px', 'type' => 'number', 'index' => 'online_qty_sold', 'frame_callback' => array($this, 'callbackColumnOnlineQtySold'))); $dir = $this->getParam($this->getVarNameDir(), $this->_defaultDir); if ($dir == 'desc') { $priceSortField = 'max_online_price'; } else { $priceSortField = 'min_online_price'; } $this->addColumn('price', array('header' => $this->__('Price'), 'align' => 'right', 'width' => '50px', 'type' => 'number', 'index' => $priceSortField, 'filter_index' => $priceSortField, 'frame_callback' => array($this, 'callbackColumnPrice'), 'filter_condition_callback' => array($this, 'callbackFilterPrice'))); $this->addColumn('end_date', array('header' => $this->__('End Date'), 'align' => 'right', 'width' => '150px', 'type' => 'datetime', 'format' => \IntlDateFormatter::MEDIUM, 'index' => 'end_date', 'frame_callback' => array($this, 'callbackColumnEndTime'))); $this->addColumn('status', array('header' => $this->__('Status'), 'width' => '100px', 'index' => 'ebay_status', 'filter_index' => 'ebay_status', 'type' => 'options', 'sortable' => false, 'options' => array(\Ess\M2ePro\Model\Listing\Product::STATUS_NOT_LISTED => $this->__('Not Listed'), \Ess\M2ePro\Model\Listing\Product::STATUS_LISTED => $this->__('Listed'), \Ess\M2ePro\Model\Listing\Product::STATUS_HIDDEN => $this->__('Listed (Hidden)'), \Ess\M2ePro\Model\Listing\Product::STATUS_SOLD => $this->__('Sold'), \Ess\M2ePro\Model\Listing\Product::STATUS_STOPPED => $this->__('Stopped'), \Ess\M2ePro\Model\Listing\Product::STATUS_FINISHED => $this->__('Finished'), \Ess\M2ePro\Model\Listing\Product::STATUS_BLOCKED => $this->__('Pending')), 'frame_callback' => array($this, 'callbackColumnStatus'))); // TODO // if ($this->getHelper('Module')->isDevelopmentMode()) { // $this->addColumn('developer_action', array( // 'header' => $this->__('Actions'), // 'align' => 'left', // 'width' => '150px', // 'type' => 'text', // 'renderer' => 'M2ePro/listing_view_grid_column_renderer_developerAction', // 'index' => 'value', // 'filter' => false, // 'sortable' => false, // 'js_handler' => 'EbayListingViewEbayGridObj' // )); // } return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('product_id', array('header' => $this->__('Product ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'entity_id', 'frame_callback' => array($this, 'callbackColumnProductId'))); $this->addColumn('name', array('header' => $this->__('Product Title / Product SKU'), 'align' => 'left', 'type' => 'text', 'index' => 'name', 'filter_index' => 'name', 'frame_callback' => array($this, 'callbackColumnProductTitle'), 'filter_condition_callback' => array($this, 'callbackFilterTitle'))); $this->addColumn('sku', array('header' => $this->__('SKU'), 'align' => 'left', 'width' => '150px', 'type' => 'text', 'index' => 'amazon_sku', 'filter_index' => 'amazon_sku', 'frame_callback' => array($this, 'callbackColumnAmazonSku'))); $this->addColumn('general_id', array('header' => $this->__('ASIN / ISBN'), 'align' => 'left', 'width' => '140px', 'type' => 'text', 'index' => 'general_id', 'filter_index' => 'general_id', 'frame_callback' => array($this, 'callbackColumnGeneralId'))); $this->addColumn('description_template', array('header' => $this->__('Description Policy'), 'align' => 'left', 'width' => '170px', 'type' => 'text', 'index' => 'template_description_title', 'filter_index' => 'template_description_title', 'frame_callback' => array($this, 'callbackColumnTemplateDescription'))); // TODO // $this->addColumn('shipping_override_template', array( // 'header' => $this->__('Shipping Override Policy'), // 'align' => 'left', // 'width' => '170px', // 'type' => 'text', // 'index' => 'template_shipping_override_title', // 'filter_index' => 'template_shipping_override_title', // 'frame_callback' => array($this, 'callbackColumnTemplateShippingOverride') // )); $this->addColumn('actions', array('header' => $this->__('Actions'), 'align' => 'left', 'width' => '100px', 'type' => 'action', 'index' => 'actions', 'filter' => false, 'sortable' => false, 'renderer' => '\\Ess\\M2ePro\\Block\\Adminhtml\\Magento\\Grid\\Column\\Renderer\\Action', 'field' => 'id', 'group_order' => $this->getGroupOrder(), 'actions' => $this->getColumnActionsItems())); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('product_id', array('header' => $this->__('Product ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'entity_id', 'frame_callback' => array($this, 'callbackColumnProductId'))); $this->addColumn('name', array('header' => $this->__('Product Title / Product SKU'), 'align' => 'left', 'type' => 'text', 'index' => 'name', 'frame_callback' => array($this, 'callbackColumnTitle'), 'filter_condition_callback' => array($this, 'callbackFilterTitle'))); $title = $this->__('eBay Categories'); if ($this->isExistsListingSettingsOverwrites()) { $title = $this->__('eBay Categories / Listing Settings Overwrites'); } $this->addColumn('category', array('header' => $title, 'align' => 'left', 'type' => 'text', 'index' => 'name', 'filter' => '\\Ess\\M2ePro\\Block\\Adminhtml\\Ebay\\Listing\\View\\Settings\\Grid\\Column\\Filter\\Category', 'frame_callback' => array($this, 'callbackColumnCategory'), 'filter_condition_callback' => array($this, 'callbackFilterCategory'))); // TODO NOT SUPPORTED FEATURES "ebay motors" // if ($this->isMotorsAvailable() && $this->motorsAttribute) { // $this->addColumnAfter('parts_motors_attribute_value', array( // 'header' => $this->__('Compatibility'), // 'align' => 'left', // 'width' => '100px', // 'type' => 'options', // 'index' => $this->motorsAttribute->getAttributeCode(), // 'sortable' => false, // 'options' => array( // 1 => $this->__('Filled'), // 0 => $this->__('Empty') // ), // 'frame_callback' => array($this, 'callbackColumnMotorsAttribute'), // 'filter_condition_callback' => array($this, 'callbackFilterMotorsAttribute'), // ), 'name'); // } $this->addColumn('actions', array('header' => $this->__('Actions'), 'align' => 'left', 'type' => 'action', 'index' => 'actions', 'filter' => false, 'sortable' => false, 'renderer' => '\\Ess\\M2ePro\\Block\\Adminhtml\\Magento\\Grid\\Column\\Renderer\\Action', 'field' => 'id', 'group_order' => $this->getGroupOrder(), 'actions' => $this->getColumnActionsItems())); return parent::_prepareColumns(); }