protected function _map() { $rows = parent::_map(); reset($rows); $fields = current($rows); return $rows; }
/** * @param $rows * @return $this */ public function _afterMap($rows) { reset($rows); $fields = current($rows); if (!$this->getConfigVar('allow_empty_color_size', 'apparel')) { if (!$this->checkColorSizeRequired($fields)) { $this->setSkip(sprintf("product id %d product sku %s, skipped - apparel product non variant, color column is empty.", $this->getProduct()->getId(), $this->getProduct()->getSku())); } } return parent::_afterMap($rows); }
/** * @param $params * @param $attributes_codes * @return string */ public function mapDirectiveVariantAttributes($params = array()) { // try to get value from parent first $value = $this->hasParentMap() ? $this->getParentMap()->mapDirectiveVariantAttributes($params) : ''; if (empty($value)) { $value = parent::mapDirectiveVariantAttributes($params); } return $value; }