Example #1
0
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     $this->categoryTemplateModel = NULL;
     $this->otherCategoryTemplateModel = NULL;
     $this->magentoProductModel = NULL;
     return parent::delete();
 }
Example #2
0
 public function delete()
 {
     if (is_null($this->getId())) {
         throw new \Ess\M2ePro\Model\Exception\Logic('Method require loaded instance first');
     }
     if ($this->isLocked()) {
         return false;
     }
     if ($this->getHelper('Component\\Ebay\\PickupStore')->isFeatureEnabled()) {
         $this->activeRecordFactory->getObject('Ebay\\Listing\\Product\\PickupStore')->getResource()->processDeletedVariation($this->getParentObject());
     }
     return parent::delete();
 }
Example #3
0
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     $this->ebayItemModel = NULL;
     $this->categoryTemplateModel = NULL;
     $this->otherCategoryTemplateModel = NULL;
     $this->templateManagers = array();
     $this->sellingFormatTemplateModel = NULL;
     $this->synchronizationTemplateModel = NULL;
     $this->descriptionTemplateModel = NULL;
     $this->paymentTemplateModel = NULL;
     $this->returnTemplateModel = NULL;
     $this->shippingTemplateModel = NULL;
     if ($this->getHelper('Component\\Ebay\\PickupStore')->isFeatureEnabled()) {
         $this->activeRecordFactory->getObject('Ebay\\Listing\\Product\\PickupStore')->getResource()->processDeletedProduct($this->getParentObject());
     }
     return parent::delete();
 }
Example #4
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Ebay\\Listing\\Product\\Variation\\Option');
 }
Example #5
0
 public function __construct(\Magento\Email\Model\Template\Filter $emailFilter, \Ess\M2ePro\Model\ActiveRecord\Component\Parent\Factory $parentFactory, \Ess\M2ePro\Model\Factory $modelFactory, \Ess\M2ePro\Model\ActiveRecord\Factory $activeRecordFactory, \Ess\M2ePro\Helper\Factory $helperFactory, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->emailFilter = $emailFilter;
     parent::__construct($parentFactory, $modelFactory, $activeRecordFactory, $helperFactory, $context, $registry, $resource, $resourceCollection, $data);
 }
Example #6
0
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     $this->sellingSourceModels = array();
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('template_sellingformat');
     return parent::delete();
 }
Example #7
0
 public function delete()
 {
     $table = $this->activeRecordFactory->getObject('Ebay\\Order\\ExternalTransaction')->getResource()->getMainTable();
     $this->_getResource()->getConnection()->delete($table, array('order_id = ?' => $this->getData('order_id')));
     return parent::delete();
 }
Example #8
0
 public function delete()
 {
     // TODO NOT SUPPORTED FEATURES
     // Delete watermark if exists
     // ---------------------------------------
     //        $varDir = new Ess\M2ePro\Model\VariablesDir(
     //            array('child_folder' => 'ebay/template/description/watermarks')
     //        );
     //
     //        $watermarkPath = $varDir->getPath().$this->getId().'.png';
     //        if (is_file($watermarkPath)) {
     //            @unlink($watermarkPath);
     //        }
     // ---------------------------------------
     $temp = parent::delete();
     $temp && ($this->descriptionSourceModels = array());
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('template_description');
     return $temp;
 }
 public function delete()
 {
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('template_synchronization');
     return parent::delete();
 }
Example #10
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Ebay\\Order\\Item');
 }
Example #11
0
 public function delete()
 {
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('marketplace');
     return parent::delete();
 }
Example #12
0
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     $this->templateManagers = array();
     $this->autoGlobalAddingCategoryTemplateModel = NULL;
     $this->autoGlobalAddingOtherCategoryTemplateModel = NULL;
     $this->autoWebsiteAddingCategoryTemplateModel = NULL;
     $this->autoWebsiteAddingOtherCategoryTemplateModel = NULL;
     $this->sellingFormatTemplateModel = NULL;
     $this->synchronizationTemplateModel = NULL;
     $this->descriptionTemplateModel = NULL;
     $this->paymentTemplateModel = NULL;
     $this->returnTemplateModel = NULL;
     $this->shippingTemplateModel = NULL;
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('listing');
     return parent::delete();
 }
Example #13
0
 public function delete()
 {
     if ($this->isLocked()) {
         return false;
     }
     $storeCategoriesTable = $this->getResource()->getTable('m2epro_ebay_account_store_category');
     $this->getResource()->getConnection()->delete($storeCategoriesTable, array('account_id = ?' => $this->getId()));
     $otherCategoryTemplates = $this->getOtherCategoryTemplates(true);
     foreach ($otherCategoryTemplates as $otherCategoryTemplate) {
         $otherCategoryTemplate->delete();
     }
     // TODO NOT SUPPORTED FEATURES
     //        $feedbacks = $this->getFeedbacks(true);
     //        foreach ($feedbacks as $feedback) {
     //            $feedback->delete();
     //        }
     //
     //        $feedbackTemplates = $this->getFeedbackTemplates(true);
     //        foreach ($feedbackTemplates as $feedbackTemplate) {
     //            $feedbackTemplate->delete();
     //        }
     //
     //        $items = $this->getEbayItems(true);
     //        foreach ($items as $item) {
     //            $item->delete();
     //        }
     //
     //        $pickupStoreCollection = $this->parentFactory->getObject($this->getComponentMode(), 'Account\PickupStore')
     //            ->getCollection()->addFieldToFilter('account_id', $this->getId());
     //        foreach ($pickupStoreCollection as $pickupStore) {
     //            /** @var \Ess\M2ePro\Model\Ebay\Account\PickupStore $pickupStore */
     //            $pickupStore->delete();
     //        }
     $this->getHelper('Data\\Cache\\Permanent')->removeTagValues('account');
     return parent::delete();
 }