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


PHP Ess_M2ePro_Model_Listing_Other::getProductId方法代码示例

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


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

示例1: autoMapOtherListingProduct

 public function autoMapOtherListingProduct(Ess_M2ePro_Model_Listing_Other $otherListing)
 {
     if ($otherListing->getProductId()) {
         return false;
     }
     $this->setAccountByOtherListingProduct($otherListing);
     $this->setMarketplaceByOtherListingProduct($otherListing);
     if (!$this->getAccount()->getChildObject()->isOtherListingsMappingEnabled()) {
         return false;
     }
     $mappingSettings = $this->getMappingRulesByPriority();
     foreach ($mappingSettings as $type) {
         $magentoProductId = NULL;
         if ($type == 'general_id') {
             $magentoProductId = $this->getGeneralIdMappedMagentoProductId($otherListing);
         }
         if ($type == 'sku') {
             $magentoProductId = $this->getSkuMappedMagentoProductId($otherListing);
         }
         if ($type == 'title') {
             $magentoProductId = $this->getTitleMappedMagentoProductId($otherListing);
         }
         if (is_null($magentoProductId)) {
             continue;
         }
         $logModel = Mage::getModel('M2ePro/Listing_Other_Log');
         $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Amazon::NICK);
         $otherListing->mapProduct($magentoProductId, Ess_M2ePro_Model_Log_Abstract::INITIATOR_EXTENSION);
         return true;
     }
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:32,代码来源:Mapping.php

示例2: autoMapOtherListingProduct

 public function autoMapOtherListingProduct(Ess_M2ePro_Model_Listing_Other $otherListing)
 {
     if ($otherListing->getProductId()) {
         return false;
     }
     $this->setAccountByOtherListingProduct($otherListing);
     if (!$this->getAccount()->getChildObject()->isOtherListingsMappingEnabled()) {
         return false;
     }
     $mappingSettings = $this->getMappingRulesByPriority();
     foreach ($mappingSettings as $type) {
         $magentoProductId = NULL;
         if ($type == 'general_id') {
             $magentoProductId = $this->getGeneralIdMappedMagentoProductId($otherListing);
         }
         if ($type == 'sku') {
             $magentoProductId = $this->getSkuMappedMagentoProductId($otherListing);
         }
         if ($type == 'title') {
             $magentoProductId = $this->getTitleMappedMagentoProductId($otherListing);
         }
         if (is_null($magentoProductId)) {
             continue;
         }
         $otherListing->mapProduct($magentoProductId, Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION);
         return true;
     }
     return false;
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:29,代码来源:Mapping.php

示例3: isMeetStopRequirements

 private function isMeetStopRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isStoppable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->getRunner()->isExistProduct($listingOther, Ess_M2ePro_Model_Listing_Product::ACTION_STOP, array())) {
         return false;
     }
     //--------------------
     /** @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
     $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
     // Correct synchronization
     //--------------------
     if (!$ebaySynchronizationTemplate->isMode()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     if ($ebaySynchronizationTemplate->isStopStatusDisabled()) {
         if (!$listingOther->getMagentoProduct()->isStatusEnabled()) {
             return true;
         }
     }
     if ($ebaySynchronizationTemplate->isStopOutOfStock()) {
         if (!$listingOther->getMagentoProduct()->isStockAvailability()) {
             return true;
         }
     }
     if ($ebaySynchronizationTemplate->isStopWhenQtyHasValue()) {
         $productQty = $listingOther->getChildObject()->getMappedQty();
         if (!is_null($productQty)) {
             $typeQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueType();
             $minQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMin();
             $maxQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMax();
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_LESS && $productQty <= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_MORE && $productQty >= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
                 return true;
             }
         }
     }
     //--------------------
     return false;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:57,代码来源:Stop.php

示例4: isMeetStopRequirements

 private function isMeetStopRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isStoppable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingOther, Ess_M2ePro_Model_Connector_Server_Ebay_Item_Dispatcher::ACTION_STOP, array())) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingOther->getAccount()->getChildObject()->isOtherListingsMappedSynchronizationEnabled()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     if ($listingOther->getChildObject()->getSynchronizationModel()->isStopStatusDisabled()) {
         if ($listingOther->getMagentoProduct()->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED) {
             return true;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isStopOutOfStock()) {
         if (!$listingOther->getMagentoProduct()->getStockAvailability()) {
             return true;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isStopWhenQtyHasValue()) {
         $productQty = $listingOther->getChildObject()->getMappedQty();
         if (!is_null($productQty)) {
             /** @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
             $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
             $typeQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueType();
             $minQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMin();
             $maxQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMax();
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_LESS && $productQty <= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_MORE && $productQty >= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
                 return true;
             }
         }
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:57,代码来源:Stop.php

示例5: autoMapOtherListingProduct

 public function autoMapOtherListingProduct(Ess_M2ePro_Model_Listing_Other $otherListing)
 {
     if ($otherListing->getProductId()) {
         return false;
     }
     $this->setAccountByOtherListingProduct($otherListing);
     $this->setMarketplaceByOtherListingProduct($otherListing);
     if (!$this->getAccount()->getChildObject()->isOtherListingsMappingEnabled()) {
         return false;
     }
     $mappingSettings = $this->getMappingRulesByPriority();
     foreach ($mappingSettings as $type) {
         $magentoProductId = NULL;
         if ($type == 'general_id') {
             $magentoProductId = $this->getGeneralIdMappedMagentoProductId($otherListing);
         }
         if ($type == 'sku') {
             $magentoProductId = $this->getSkuMappedMagentoProductId($otherListing);
         }
         if ($type == 'title') {
             $magentoProductId = $this->getTitleMappedMagentoProductId($otherListing);
         }
         if (is_null($magentoProductId)) {
             continue;
         }
         $logModel = Mage::getModel('M2ePro/Listing_Other_Log');
         $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Amazon::NICK);
         //TODO temporarily type simple filter
         //---------------------------
         $magentoProduct = Mage::getModel('M2ePro/Magento_Product');
         $magentoProduct->setProductId($magentoProductId);
         if ($magentoProduct->isProductWithVariations()) {
             $messageString = Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('Item was not mapped to %id% Product as this is a multi variations product.', array('!id' => $magentoProductId));
             $logModel->addProductMessage($otherListing->getId(), Ess_M2ePro_Model_Log_Abstract::INITIATOR_EXTENSION, NULL, Ess_M2ePro_Model_Listing_Other_Log::ACTION_MAP_LISTING, $messageString, Ess_M2ePro_Model_Log_Abstract::TYPE_ERROR, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
             continue;
         }
         //---------------------------
         $otherListing->mapProduct($magentoProductId, Ess_M2ePro_Model_Log_Abstract::INITIATOR_EXTENSION);
         return true;
     }
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:42,代码来源:Mapping.php

示例6: addProductFromOther

 public function addProductFromOther(Ess_M2ePro_Model_Listing_Other $listingOtherProduct, $checkingMode = false, $checkHasProduct = true)
 {
     if (!$listingOtherProduct->getProductId()) {
         return false;
     }
     $productId = $listingOtherProduct->getProductId();
     $result = $this->getParentObject()->addProduct($productId, $checkingMode, $checkHasProduct);
     if ($checkingMode) {
         return $result;
     }
     if (!$result instanceof Ess_M2ePro_Model_Listing_Product) {
         return false;
     }
     $listingProduct = $result;
     $listingProduct->getChildObject()->getPlayItem()->setData('store_id', $this->getParentObject()->getStoreId())->save();
     $dataForUpdate = array('general_id' => $listingOtherProduct->getChildObject()->getGeneralId(), 'play_listing_id' => $listingOtherProduct->getChildObject()->getPlayListingId(), 'link_info' => $listingOtherProduct->getChildObject()->getLinkInfo(), 'general_id_type' => $listingOtherProduct->getChildObject()->getGeneralIdType(), 'sku' => $listingOtherProduct->getChildObject()->getSku(), 'online_price_gbr' => $listingOtherProduct->getChildObject()->getOnlinePriceGbr(), 'online_price_euro' => $listingOtherProduct->getChildObject()->getOnlinePriceEuro(), 'online_shipping_price_gbr' => 0, 'online_shipping_price_euro' => 0, 'online_qty' => $listingOtherProduct->getChildObject()->getOnlineQty(), 'condition' => $listingOtherProduct->getChildObject()->getCondition(), 'condition_note' => $listingOtherProduct->getChildObject()->getConditionNote(), 'dispatch_to' => $listingOtherProduct->getChildObject()->getDispatchTo(), 'dispatch_from' => $listingOtherProduct->getChildObject()->getDispatchFrom(), 'status' => $listingOtherProduct->getStatus(), 'status_changer' => $listingOtherProduct->getStatusChanger());
     $listingProduct->addData($dataForUpdate)->save();
     return $listingProduct;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:19,代码来源:Listing.php

示例7: isMeetReviseGeneralRequirements

 /**
  * @param Ess_M2ePro_Model_Listing_Other $listingOther
  * @return bool
  * @throws Ess_M2ePro_Model_Exception_Logic
  */
 protected function isMeetReviseGeneralRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     if (!$listingOther->isListed() || !$listingOther->isRevisable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     /** @var Ess_M2ePro_Model_Ebay_Listing_Other $ebayListingOther */
     $ebayListingOther = $listingOther->getChildObject();
     $ebaySynchronizationTemplate = $ebayListingOther->getSynchronizationModel();
     if (!$ebaySynchronizationTemplate->isMode()) {
         return false;
     }
     return true;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:21,代码来源:Inspector.php

示例8: addProductFromOther

 public function addProductFromOther(Ess_M2ePro_Model_Listing_Other $listingOtherProduct, $checkingMode = false, $checkHasProduct = true)
 {
     if (!$listingOtherProduct->getProductId()) {
         return false;
     }
     $productId = $listingOtherProduct->getProductId();
     $result = $this->getParentObject()->addProduct($productId, $checkingMode, $checkHasProduct);
     if ($checkingMode) {
         return $result;
     }
     if (!$result instanceof Ess_M2ePro_Model_Listing_Product) {
         return false;
     }
     $listingProduct = $result;
     $listingProduct->getChildObject()->getBuyItem()->setData('store_id', $this->getParentObject()->getStoreId())->save();
     $dataForUpdate = array('general_id' => $listingOtherProduct->getChildObject()->getGeneralId(), 'sku' => $listingOtherProduct->getChildObject()->getSku(), 'online_price' => $listingOtherProduct->getChildObject()->getOnlinePrice(), 'online_qty' => $listingOtherProduct->getChildObject()->getOnlineQty(), 'condition' => $listingOtherProduct->getChildObject()->getCondition(), 'condition_note' => $listingOtherProduct->getChildObject()->getConditionNote(), 'shipping_standard_rate' => $listingOtherProduct->getChildObject()->getShippingStandardRate(), 'shipping_expedited_mode' => $listingOtherProduct->getChildObject()->getShippingExpeditedMode(), 'shipping_expedited_rate' => $listingOtherProduct->getChildObject()->getShippingExpeditedRate(), 'status' => $listingOtherProduct->getStatus(), 'status_changer' => $listingOtherProduct->getStatusChanger());
     $listingProduct->addData($dataForUpdate)->save();
     return $listingProduct;
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:19,代码来源:Listing.php

示例9: isMeetRelistRequirements

 private function isMeetRelistRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // eBay available status
     //--------------------
     if ($listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isRelistable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingOther, Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_RELIST, array())) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingOther->getAccount()->getChildObject()->isOtherListingsMappedSynchronizationEnabled()) {
         return false;
     }
     if (!$listingOther->getChildObject()->getSynchronizationModel()->isRelistMode()) {
         return false;
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistFilterUserLock() && $listingOther->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistStatusEnabled()) {
         if ($listingOther->getMagentoProduct()->getStatus() != Mage_Catalog_Model_Product_Status::STATUS_ENABLED) {
             return false;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistIsInStock()) {
         if (!$listingOther->getMagentoProduct()->getStockAvailability()) {
             return false;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistWhenQtyHasValue()) {
         $productQty = $listingOther->getChildObject()->getMappedQty();
         if (!is_null($productQty)) {
             $result = false;
             /** @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
             $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
             $typeQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueType();
             $minQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueMin();
             $maxQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueMax();
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_LESS && $productQty <= $minQty) {
                 $result = true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_MORE && $productQty >= $minQty) {
                 $result = true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             }
             if (!$result) {
                 return false;
             }
         }
     }
     //--------------------
     return true;
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:67,代码来源:Relist.php

示例10: addProductFromOther

 /**
  * @param Ess_M2ePro_Model_Listing_Other $listingOtherProduct
  * @param bool $checkingMode
  * @param bool $checkHasProduct
  * @return bool|Ess_M2ePro_Model_Listing_Product
  * @throws Ess_M2ePro_Model_Exception_Logic
  */
 public function addProductFromOther(Ess_M2ePro_Model_Listing_Other $listingOtherProduct, $checkingMode = false, $checkHasProduct = true)
 {
     if (!$listingOtherProduct->getProductId()) {
         return false;
     }
     $productId = $listingOtherProduct->getProductId();
     $result = $this->getParentObject()->addProduct($productId, $checkingMode, $checkHasProduct);
     if ($checkingMode) {
         return $result;
     }
     if (!$result instanceof Ess_M2ePro_Model_Listing_Product) {
         return false;
     }
     $listingProduct = $result;
     /** @var Ess_M2ePro_Model_Amazon_Listing_Product $amazonListingProduct */
     $amazonListingProduct = $listingProduct->getChildObject();
     $variationManager = $amazonListingProduct->getVariationManager();
     if ($variationManager->isRelationParentType()) {
         $variationManager->switchModeToAnother();
     }
     $amazonListingProduct->getAmazonItem()->setData('store_id', $this->getParentObject()->getStoreId())->save();
     /** @var Ess_M2ePro_Model_Amazon_Listing_Other $amazonListingOther */
     $amazonListingOther = $listingOtherProduct->getChildObject();
     $dataForUpdate = array('general_id' => $amazonListingOther->getGeneralId(), 'sku' => $amazonListingOther->getSku(), 'online_price' => $amazonListingOther->getOnlinePrice(), 'online_qty' => $amazonListingOther->getOnlineQty(), 'is_afn_channel' => (int) $amazonListingOther->isAfnChannel(), 'is_isbn_general_id' => (int) $amazonListingOther->isIsbnGeneralId(), 'status' => $listingOtherProduct->getStatus(), 'status_changer' => $listingOtherProduct->getStatusChanger());
     $listingProduct->addData($dataForUpdate)->save();
     return $listingProduct;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:34,代码来源:Listing.php

示例11: addProductFromOther

 public function addProductFromOther(Ess_M2ePro_Model_Listing_Other $listingOtherProduct, $checkingMode = false, $checkHasProduct = true)
 {
     if (!$listingOtherProduct->getProductId()) {
         return false;
     }
     $productId = $listingOtherProduct->getProductId();
     $result = $this->getParentObject()->addProduct($productId, $checkingMode, true);
     if ($checkingMode) {
         return $result;
     }
     if (!$result instanceof Ess_M2ePro_Model_Listing_Product) {
         return false;
     }
     $listingProduct = $result;
     /** @var $collection Mage_Core_Model_Mysql4_Collection_Abstract */
     $collection = Mage::getModel('M2ePro/Ebay_Item')->getCollection()->addFieldToFilter('account_id', $listingOtherProduct->getAccount()->getId())->addFieldToFilter('item_id', $listingOtherProduct->getChildObject()->getItemId());
     $ebayItem = $collection->getFirstItem();
     $ebayItem->setData('store_id', $this->getParentObject()->getStoreId())->save();
     $dataForUpdate = array('ebay_item_id' => $ebayItem->getId(), 'online_sku' => $listingOtherProduct->getChildObject()->getSku(), 'online_title' => $listingOtherProduct->getChildObject()->getTitle(), 'online_buyitnow_price' => $listingOtherProduct->getChildObject()->getOnlinePrice(), 'online_qty' => $listingOtherProduct->getChildObject()->getOnlineQty(), 'online_qty_sold' => $listingOtherProduct->getChildObject()->getOnlineQtySold(), 'online_bids' => $listingOtherProduct->getChildObject()->getOnlineBids(), 'start_date' => $listingOtherProduct->getChildObject()->getStartDate(), 'end_date' => $listingOtherProduct->getChildObject()->getEndDate(), 'status' => $listingOtherProduct->getStatus(), 'status_changer' => $listingOtherProduct->getStatusChanger());
     $listingProduct->addData($dataForUpdate)->save();
     return $listingProduct;
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:22,代码来源:Listing.php

示例12: createNewEbayItemsId

 protected function createNewEbayItemsId(Ess_M2ePro_Model_Listing_Other $listingOther, $ebayRealItemId)
 {
     $dataForAdd = array('item_id' => (double) $ebayRealItemId, 'product_id' => (int) $listingOther->getProductId(), 'store_id' => (int) $listingOther->getChildObject()->getRelatedStoreId());
     return Mage::getModel('M2ePro/Ebay_Item')->setData($dataForAdd)->save()->getId();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:5,代码来源:Helper.php

示例13: inspectRevisePriceRequirements

 private function inspectRevisePriceRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('price' => true));
     //--------------------
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isRevisable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingOther, Ess_M2ePro_Model_Connector_Server_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams)) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingOther->getAccount()->getChildObject()->isOtherListingsMappedSynchronizationEnabled()) {
         return false;
     }
     if (!$listingOther->getChildObject()->getSynchronizationModel()->isReviseWhenChangePrice()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $ebayListingOther = $listingOther->getChildObject();
     $currentPrice = $ebayListingOther->getMappedPrice();
     if (is_null($currentPrice)) {
         return false;
     }
     $onlinePrice = $ebayListingOther->getOnlinePrice();
     if ($currentPrice != $onlinePrice) {
         $this->_runnerActions->setProduct($listingOther, Ess_M2ePro_Model_Connector_Server_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:45,代码来源:Revise.php

示例14: addProductFromOther

 public function addProductFromOther(Ess_M2ePro_Model_Listing_Other $listingOtherProduct)
 {
     if (!$listingOtherProduct->getProductId()) {
         return false;
     }
     $productId = $listingOtherProduct->getProductId();
     $listingProduct = $this->getParentObject()->addProduct($productId);
     if (!$listingProduct instanceof Ess_M2ePro_Model_Listing_Product) {
         return false;
     }
     $listingProduct->getChildObject()->getAmazonItem()->setData('store_id', $this->getParentObject()->getStoreId())->save();
     $dataForUpdate = array('general_id' => $listingOtherProduct->getChildObject()->getGeneralId(), 'sku' => $listingOtherProduct->getChildObject()->getSku(), 'online_price' => $listingOtherProduct->getChildObject()->getOnlinePrice(), 'online_qty' => $listingOtherProduct->getChildObject()->getOnlineQty(), 'is_afn_channel' => (int) $listingOtherProduct->getChildObject()->isAfnChannel(), 'is_isbn_general_id' => (int) $listingOtherProduct->getChildObject()->isIsbnGeneralId(), 'start_date' => $listingOtherProduct->getChildObject()->getStartDate(), 'end_date' => $listingOtherProduct->getChildObject()->getEndDate(), 'status' => $listingOtherProduct->getStatus(), 'status_changer' => $listingOtherProduct->getStatusChanger());
     $listingProduct->addData($dataForUpdate)->save();
     return $listingProduct;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:15,代码来源:Listing.php

示例15: inspectRevisePriceRequirements

 private function inspectRevisePriceRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('price' => true));
     //--------------------
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isRevisable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->getRunner()->isExistProduct($listingOther, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams)) {
         return false;
     }
     //--------------------
     /* @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
     $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
     // Correct synchronization
     //--------------------
     if (!$ebaySynchronizationTemplate->isMode()) {
         return false;
     }
     if (!$ebaySynchronizationTemplate->isReviseWhenChangePrice()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $ebayListingOther = $listingOther->getChildObject();
     $currentPrice = $ebayListingOther->getMappedPrice();
     if (is_null($currentPrice)) {
         return false;
     }
     $onlinePrice = $ebayListingOther->getOnlinePrice();
     if ($currentPrice != $onlinePrice) {
         $this->getRunner()->addProduct($listingOther, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     return false;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:47,代码来源:Revise.php


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