当前位置: 首页>>代码示例>>PHP>>正文


PHP Ess_M2ePro_Model_Magento_Product::getProductId方法代码示例

本文整理汇总了PHP中Ess_M2ePro_Model_Magento_Product::getProductId方法的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Magento_Product::getProductId方法的具体用法?PHP Ess_M2ePro_Model_Magento_Product::getProductId怎么用?PHP Ess_M2ePro_Model_Magento_Product::getProductId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ess_M2ePro_Model_Magento_Product的用法示例。


在下文中一共展示了Ess_M2ePro_Model_Magento_Product::getProductId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: prepareAssociatedProducts

 public function prepareAssociatedProducts(array $associatedProducts)
 {
     if ($this->magentoProduct->isSimpleType() || $this->magentoProduct->isDownloadableType()) {
         return array($this->magentoProduct->getProductId());
     }
     if ($this->magentoProduct->isBundleType()) {
         $bundleAssociatedProducts = array();
         foreach ($associatedProducts as $key => $productIds) {
             $bundleAssociatedProducts[$key] = reset($productIds);
         }
         return $bundleAssociatedProducts;
     }
     if ($this->magentoProduct->isConfigurableType()) {
         $configurableAssociatedProducts = array();
         foreach ($associatedProducts as $productIds) {
             if (count($configurableAssociatedProducts) == 0) {
                 $configurableAssociatedProducts = $productIds;
             } else {
                 $configurableAssociatedProducts = array_intersect($configurableAssociatedProducts, $productIds);
             }
         }
         if (count($configurableAssociatedProducts) != 1) {
             throw new LogicException('There is no associated product found for configurable product.');
         }
         return $configurableAssociatedProducts;
     }
     if ($this->magentoProduct->isGroupedType()) {
         return array_values($associatedProducts);
     }
     return array();
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:31,代码来源:OptionsFinder.php

示例2: getSource

 /**
  * @param Ess_M2ePro_Model_Magento_Product $magentoProduct
  * @return Ess_M2ePro_Model_Ebay_Template_Category_Specific_Source
  */
 public function getSource(Ess_M2ePro_Model_Magento_Product $magentoProduct)
 {
     $productId = $magentoProduct->getProductId();
     if (!empty($this->categorySpecificSourceModels[$productId])) {
         return $this->categorySpecificSourceModels[$productId];
     }
     $this->categorySpecificSourceModels[$productId] = Mage::getModel('M2ePro/Ebay_Template_Category_Specific_Source');
     $this->categorySpecificSourceModels[$productId]->setMagentoProduct($magentoProduct);
     $this->categorySpecificSourceModels[$productId]->setCategorySpecificTemplate($this);
     return $this->categorySpecificSourceModels[$productId];
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:15,代码来源:Specific.php

示例3: getSource

 /**
  * @param Ess_M2ePro_Model_Magento_Product $magentoProduct
  * @return Ess_M2ePro_Model_Play_Listing_Source
  */
 public function getSource(Ess_M2ePro_Model_Magento_Product $magentoProduct)
 {
     $productId = $magentoProduct->getProductId();
     if (!empty($this->listingSourceModels[$productId])) {
         return $this->listingSourceModels[$productId];
     }
     $this->listingSourceModels[$productId] = Mage::getModel('M2ePro/Play_Listing_Source');
     $this->listingSourceModels[$productId]->setMagentoProduct($magentoProduct);
     $this->listingSourceModels[$productId]->setListing($this->getParentObject());
     return $this->listingSourceModels[$productId];
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:15,代码来源:Listing.php

示例4: getSource

 /**
  * @param Ess_M2ePro_Model_Magento_Product $magentoProduct
  * @return Ess_M2ePro_Model_Buy_Template_NewProduct_Attribute_Source
  */
 public function getSource(Ess_M2ePro_Model_Magento_Product $magentoProduct)
 {
     $productId = $magentoProduct->getProductId();
     if (!empty($this->newProductAttributeSourceModels[$productId])) {
         return $this->newProductAttributeSourceModels[$productId];
     }
     $this->newProductAttributeSourceModels[$productId] = Mage::getModel('M2ePro/Buy_Template_NewProduct_Attribute_Source');
     $this->newProductAttributeSourceModels[$productId]->setMagentoProduct($magentoProduct);
     $this->newProductAttributeSourceModels[$productId]->setNewProductAttributeTemplate($this);
     return $this->newProductAttributeSourceModels[$productId];
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:15,代码来源:Attribute.php

示例5: getSource

 /**
  * @param Ess_M2ePro_Model_Magento_Product $magentoProduct
  * @return Ess_M2ePro_Model_Amazon_Template_Description_Specific_Source
  */
 public function getSource(Ess_M2ePro_Model_Magento_Product $magentoProduct)
 {
     $productId = $magentoProduct->getProductId();
     if (!empty($this->descriptionSpecificSourceModels[$productId])) {
         return $this->descriptionSpecificSourceModels[$productId];
     }
     $this->descriptionSpecificSourceModels[$productId] = Mage::getModel('M2ePro/Amazon_Template_Description_Specific_Source');
     $this->descriptionSpecificSourceModels[$productId]->setMagentoProduct($magentoProduct);
     $this->descriptionSpecificSourceModels[$productId]->setDescriptionSpecificTemplate($this);
     return $this->descriptionSpecificSourceModels[$productId];
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:15,代码来源:Specific.php

示例6: getSource

 /**
  * @param Ess_M2ePro_Model_Magento_Product $magentoProduct
  * @return Ess_M2ePro_Model_Ebay_Template_Shipping_Service_Source
  */
 public function getSource(Ess_M2ePro_Model_Magento_Product $magentoProduct)
 {
     $productId = $magentoProduct->getProductId();
     if (!empty($this->shippingServiceSourceModels[$productId])) {
         return $this->shippingServiceSourceModels[$productId];
     }
     $this->shippingServiceSourceModels[$productId] = Mage::getModel('M2ePro/Ebay_Template_Shipping_Service_Source');
     $this->shippingServiceSourceModels[$productId]->setMagentoProduct($magentoProduct);
     $this->shippingServiceSourceModels[$productId]->setShippingServiceTemplate($this);
     return $this->shippingServiceSourceModels[$productId];
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:15,代码来源:Service.php

示例7: getSource

 /**
  * @param Ess_M2ePro_Model_Magento_Product $magentoProduct
  * @return Ess_M2ePro_Model_Ebay_Template_Description_Source
  */
 public function getSource(Ess_M2ePro_Model_Magento_Product $magentoProduct)
 {
     $productId = $magentoProduct->getProductId();
     if (!empty($this->descriptionSourceModels[$productId])) {
         return $this->descriptionSourceModels[$productId];
     }
     $this->descriptionSourceModels[$productId] = Mage::getModel('M2ePro/Ebay_Template_Description_Source');
     $this->descriptionSourceModels[$productId]->setMagentoProduct($magentoProduct);
     $this->descriptionSourceModels[$productId]->setDescriptionTemplate($this->getParentObject());
     return $this->descriptionSourceModels[$productId];
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:15,代码来源:Description.php


注:本文中的Ess_M2ePro_Model_Magento_Product::getProductId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。