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


PHP Ess_M2ePro_Model_Listing_Other::addData方法代码示例

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


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

示例1: updateProductAfterAction

 protected function updateProductAfterAction(Ess_M2ePro_Model_Listing_Other $listingOther, array $nativeRequestData = array(), array $params = array(), $ebayItemId = NULL, $saveEbayQtySold = false)
 {
     $dataForUpdate = array('status' => Ess_M2ePro_Model_Listing_Product::STATUS_LISTED);
     !is_null($ebayItemId) && ($dataForUpdate['item_id'] = $ebayItemId);
     isset($params['status_changer']) && ($dataForUpdate['status_changer'] = (int) $params['status_changer']);
     if (isset($params['start_date_raw'])) {
         $dataForUpdate['start_date'] = Ess_M2ePro_Model_Connector_Server_Ebay_Abstract::ebayTimeToString($params['start_date_raw']);
     }
     if (isset($params['end_date_raw'])) {
         $dataForUpdate['end_date'] = Ess_M2ePro_Model_Connector_Server_Ebay_Abstract::ebayTimeToString($params['end_date_raw']);
     }
     if (isset($nativeRequestData['title'])) {
         $dataForUpdate['title'] = $nativeRequestData['title'];
     }
     if ($saveEbayQtySold) {
         $dataForUpdate['online_qty_sold'] = is_null($listingOther->getChildObject()->getOnlineQtySold()) ? 0 : $listingOther->getChildObject()->getOnlineQtySold();
         if (isset($nativeRequestData['qty'])) {
             $dataForUpdate['online_qty'] = (int) $nativeRequestData['qty'] + (int) $dataForUpdate['online_qty_sold'];
         }
     } else {
         $dataForUpdate['online_qty_sold'] = 0;
         if (isset($nativeRequestData['qty'])) {
             $dataForUpdate['online_qty'] = (int) $nativeRequestData['qty'];
         }
     }
     if (isset($nativeRequestData['price_fixed'])) {
         $dataForUpdate['online_price'] = (double) $nativeRequestData['price_fixed'];
     }
     $listingOther->addData($dataForUpdate)->save();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:30,代码来源:Helper.php

示例2: modifyAndLogListingOther

 private function modifyAndLogListingOther(Ess_M2ePro_Model_Listing_Other $listingOther, $status, $duplicateItemId = null)
 {
     /** @var Ess_M2ePro_Model_Listing_Other_Log $logModel */
     $logModel = Mage::getModel('M2ePro/Listing_Other_Log');
     $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
     $logActionId = $logModel->getNextActionId();
     $statusLogMessage = $this->getStatusLogMessage($listingOther->getStatus(), $status);
     $logModel->addProductMessage($listingOther->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, $logActionId, Ess_M2ePro_Model_Listing_Other_Log::ACTION_CHANNEL_CHANGE, $statusLogMessage, Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
     $additionalData = $listingOther->getAdditionalData();
     unset($additionalData['last_failed_action_data']);
     $listingOther->addData(array('status' => $status, 'additional_data' => json_encode($additionalData)))->save();
     if (is_null($duplicateItemId)) {
         return;
     }
     // M2ePro_TRANSLATIONS
     // Duplicated Item %item_id% was found and Stopped on eBay.
     $textToTranslate = 'Duplicated Item %item_id% was found and stopped on eBay.';
     $duplicateDeletedMessage = Mage::helper('M2ePro')->__($textToTranslate, $duplicateItemId);
     $logModel->addProductMessage($listingOther->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, $logActionId, Ess_M2ePro_Model_Listing_Other_Log::ACTION_CHANNEL_CHANGE, $duplicateDeletedMessage, Ess_M2ePro_Model_Log_Abstract::TYPE_WARNING, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:20,代码来源:RemoveDuplicates.php


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