Example #1
0
 /**
  * Import 'group' value
  *
  * @param \XLite\Model\Attribute $model  Attribute
  * @param string                 $value  Value
  * @param array                  $column Column info
  *
  * @return void
  */
 protected function importGroupColumn(\XLite\Model\Attribute $model, $value, array $column)
 {
     if ($value) {
         $group = $this->normalizeGroupValue($value);
         $this->updateModelTranslations($group, $value);
         $group->setProductClass($model->getProductClass());
         $model->setAttributeGroup($group);
     }
 }
Example #2
0
 /**
  * Return unique field name
  *
  * @param \XLite\Model\Attribute $attribute Attribute
  *
  * @return string
  */
 protected function getUniqueFieldName(\XLite\Model\Attribute $attribute)
 {
     $result = $attribute->getName() . ' (field:';
     $cnd = new \XLite\Core\CommonCell();
     $cnd->name = $attribute->getName();
     if ($attribute->getProduct()) {
         $result .= 'product';
     } elseif ($attribute->getProductClass()) {
         $result .= 'class';
     } else {
         $result .= 'global';
     }
     if ($attribute->getAttributeGroup()) {
         $result .= ' >>> ' . $attribute->getAttributeGroup()->getName();
     }
     $result .= ')';
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function getProductClass()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getProductClass', array());
     return parent::getProductClass();
 }