private function getOptionMatcher() { if (!is_null($this->optionMatcher)) { return $this->optionMatcher; } $this->optionMatcher = Mage::getModel('M2ePro/Amazon_Listing_Product_Variation_Matcher_Option'); $this->optionMatcher->setMarketplaceId($this->getProcessor()->getMarketplaceId()); $this->optionMatcher->setMagentoProduct($this->getProcessor()->getListingProduct()->getMagentoProduct()); $this->optionMatcher->setMatchedAttributes($this->getProcessor()->getTypeModel()->getMatchedAttributes()); return $this->optionMatcher; }
public function __construct() { parent::__construct(); $this->productId = Mage::helper('M2ePro/Data_Global')->getValue('product_id'); $this->listingProduct = Mage::getModel('M2ePro/Listing_Product')->load($this->productId); $this->matcherAttributes = Mage::getModel('M2ePro/Amazon_Listing_Product_Variation_Matcher_Attribute'); $this->matcherAttributes->setMarketplaceId(Mage::helper('M2ePro/Data_Global')->getValue('marketplace_id')); $this->matcherOptions = Mage::getModel('M2ePro/Amazon_Listing_Product_Variation_Matcher_Option'); $this->matcherOptions->setMarketplaceId(Mage::helper('M2ePro/Data_Global')->getValue('marketplace_id')); $this->currency = Mage::helper('M2ePro/Component_Amazon')->getCachedObject('Marketplace', Mage::helper('M2ePro/Data_Global')->getValue('marketplace_id'))->getChildObject()->getDefaultCurrency(); // Initialization block //------------------------------ $this->setId('amazonProductSearchGrid'); //------------------------------ // Set default values //------------------------------ $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('id'); $this->setDefaultDir('ASC'); $this->setSaveParametersInSession(true); $this->setUseAjax(true); //------------------------------ }