/** * @return \Ess\M2ePro\Model\Ebay\Template\Category */ public function getCategoryTemplate() { if (is_null($this->categoryTemplateModel)) { try { $this->categoryTemplateModel = $this->activeRecordFactory->getCachedObjectLoaded('Ebay\\Template\\Category', (int) $this->getAddingTemplateCategoryId()); } catch (\Exception $exception) { return $this->categoryTemplateModel; } if (!is_null($this->getMagentoProduct())) { $this->categoryTemplateModel->setMagentoProduct($this->getMagentoProduct()); } } return $this->categoryTemplateModel; }
private function isMainCategoryWasChanged(\Ess\M2ePro\Model\Ebay\Template\Category $template, $selectedValue) { return $template->getData('category_main_id') != $selectedValue && $template->getData('category_main_attribute') != $selectedValue; }