コード例 #1
0
 /**
  * @return Ess_M2ePro_Model_Amazon_Listing_Product_Variation_Matcher_Attribute
  */
 public function getMatcherAttributes()
 {
     if (empty($this->matcherAttributes)) {
         $this->matcherAttributes = Mage::getModel('M2ePro/Amazon_Listing_Product_Variation_Matcher_Attribute');
         $this->matcherAttributes->setMarketplaceId($this->getListingProduct()->getListing()->getMarketplaceId());
         $this->matcherAttributes->setMagentoProduct($this->getListingProduct()->getMagentoProduct());
         $this->matcherAttributes->setDestinationAttributes($this->getDestinationAttributes());
     }
     return $this->matcherAttributes;
 }
コード例 #2
0
ファイル: Grid.php プロジェクト: newedge-media/iwantmymeds
 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);
     //------------------------------
 }