예제 #1
0
 /**
  * @return bool
  * @throws \Ess\M2ePro\Model\Exception\Logic
  */
 public function isLocked()
 {
     if (parent::isLocked()) {
         return true;
     }
     return (bool) $this->activeRecordFactory->getObject('Amazon\\Listing')->getCollection()->addFieldToFilter('template_synchronization_id', $this->getId())->getSize();
 }
예제 #2
0
 /**
  * @return bool
  * @throws \Ess\M2ePro\Model\Exception
  * @throws \Ess\M2ePro\Model\Exception\Logic
  */
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     if ($this->getVariationManager()->isRelationParentType()) {
         foreach ($this->getVariationManager()->getTypeModel()->getChildListingsProducts() as $child) {
             /** @var $child \Ess\M2ePro\Model\Listing\Product */
             $child->delete();
         }
     }
     $this->variationManager = NULL;
     return parent::delete();
 }
예제 #3
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Order\\Item');
 }
예제 #4
0
 public function delete()
 {
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('template_sellingformat');
     return parent::delete();
 }
예제 #5
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Product\\Variation\\Option');
 }
예제 #6
0
 /**
  * @return array
  */
 public function getDataSnapshot()
 {
     $data = parent::getDataSnapshot();
     $data['specifics'] = $this->getSpecifics();
     $data['definition'] = $this->getDefinitionTemplate() ? $this->getDefinitionTemplate()->getData() : array();
     foreach ($data['specifics'] as &$specificsData) {
         foreach ($specificsData as &$value) {
             !is_null($value) && !is_array($value) && ($value = (string) $value);
         }
     }
     unset($value);
     foreach ($data['definition'] as &$value) {
         !is_null($value) && !is_array($value) && ($value = (string) $value);
     }
     return $data;
 }
예제 #7
0
 public function delete()
 {
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('marketplace');
     return parent::delete();
 }
예제 #8
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Other');
 }
예제 #9
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Auto\\Category\\Group');
 }
예제 #10
0
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     $items = $this->getAmazonItems(true);
     foreach ($items as $item) {
         $item->delete();
     }
     // TODO NOT SUPPORTED FEATURE repricing
     //        if ($this->isRepricing()) {
     //            $this->getRepricing()->delete();
     //        }
     $this->marketplaceModel = NULL;
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('account');
     return parent::delete();
 }
예제 #11
0
 public function delete()
 {
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('listing');
     $temp = parent::delete();
     $temp && ($this->sellingFormatTemplateModel = NULL);
     $temp && ($this->synchronizationTemplateModel = NULL);
     return $temp;
 }