Esempio n. 1
0
 /**
  * Clone
  *
  * @return \XLite\Model\AEntity
  */
 public function cloneEntity()
 {
     $newEntity = parent::cloneEntity();
     if ($this->getAttributeOption()) {
         if ($this->getAttribute()->getProduct()) {
             $attributeOption = $this->getAttributeOption()->cloneEntity();
             \XLite\Core\Database::getEM()->persist($attributeOption);
         } else {
             $attributeOption = $this->getAttributeOption();
         }
         $newEntity->setAttributeOption($attributeOption);
     }
     return $newEntity;
 }
Esempio n. 2
0
 /**
  * Return modifiers
  *
  * @return array
  */
 protected function getModifiers()
 {
     return \XLite\Model\AttributeValue\Multiple::getModifiers();
 }
Esempio n. 3
0
 /**
  * Get weight modifier base value
  *
  * @return float
  */
 protected function getModifierBaseWeight()
 {
     return $this->getVariant() ? $this->getVariant()->getClearWeight() : parent::getModifierBaseWeight();
 }