/** * @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(); }
/** * @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(); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Order\\Item'); }
public function delete() { $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('template_sellingformat'); return parent::delete(); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Product\\Variation\\Option'); }
/** * @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; }
public function delete() { $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('marketplace'); return parent::delete(); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Other'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Auto\\Category\\Group'); }
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(); }
public function delete() { $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('listing'); $temp = parent::delete(); $temp && ($this->sellingFormatTemplateModel = NULL); $temp && ($this->synchronizationTemplateModel = NULL); return $temp; }