Пример #1
0
 /**
  * @param Order $entity
  *
  * {@inheritdoc}
  */
 protected function afterProcessEntity($entity)
 {
     if (!$entity->getUpdatedAt() && $entity->getCreatedAt()) {
         $entity->setUpdatedAt($entity->getCreatedAt());
     }
     /** @var Order $order */
     $this->processCart($entity);
     $this->processItems($entity);
     $this->processAddresses($entity);
     $this->processCustomer($entity, $entity->getCustomer());
     $this->existingEntity = null;
     $this->appendDataToContext(self::CONTEXT_ORDER_POST_PROCESS_IDS, $entity->getIncrementId());
     return parent::afterProcessEntity($entity);
 }