Exemplo n.º 1
0
 /**
  * Update entities
  *
  * @return void
  */
 protected function updateEntities()
 {
     parent::updateEntities();
     // Register changes in order history
     $this->processOrderItemsChanges($this->orderItemsData, $this->getOrderItemsData());
     // Update stock
     $this->changeAmountInStock();
 }
Exemplo n.º 2
0
 /**
  * Update entities
  *
  * @return void
  */
 protected function updateEntities()
 {
     parent::updateEntities();
     $enabled = false;
     $name = 'State';
     $custom_state_position = 0;
     foreach ($this->getPageData() as $entity) {
         if ('state_id' == $entity->getServiceName()) {
             $enabled = $entity->getEnabled();
             $name = $entity->getName();
             $custom_state_position = $entity->getPosition();
         }
     }
     $entity = \XLite\Core\Database::getRepo('XLite\\Model\\AddressField')->findOneByServiceName('custom_state');
     if ($entity) {
         $entity->setEnabled($enabled);
         $entity->setName($name);
         $entity->setPosition($custom_state_position);
     }
 }