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


PHP Ess_M2ePro_Model_Marketplace::getId方法代码示例

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


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

示例1: saveDetailsToDb

 protected function saveDetailsToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $details)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $coreResourceModel = Mage::getSingleton('core/resource');
     $tableMarketplaces = $coreResourceModel->getTableName('m2epro_ebay_dictionary_marketplace');
     $tableShipping = $coreResourceModel->getTableName('m2epro_ebay_dictionary_shipping');
     // Save marketplaces
     // ---------------------------------------
     $connWrite->delete($tableMarketplaces, array('marketplace_id = ?' => $marketplace->getId()));
     $insertData = array('marketplace_id' => $marketplace->getId(), 'client_details_last_update_date' => isset($details['last_update']) ? $details['last_update'] : NULL, 'server_details_last_update_date' => isset($details['last_update']) ? $details['last_update'] : NULL, 'dispatch' => json_encode($details['dispatch']), 'packages' => json_encode($details['packages']), 'return_policy' => json_encode($details['return_policy']), 'listing_features' => json_encode($details['listing_features']), 'payments' => json_encode($details['payments']), 'shipping_locations' => json_encode($details['shipping_locations']), 'shipping_locations_exclude' => json_encode($details['shipping_locations_exclude']), 'tax_categories' => json_encode($details['tax_categories']), 'charities' => json_encode($details['charities']));
     if (isset($details['additional_data'])) {
         $insertData['additional_data'] = json_encode($details['additional_data']);
     }
     unset($details['categories_version']);
     $connWrite->insert($tableMarketplaces, $insertData);
     // ---------------------------------------
     // Save shipping
     // ---------------------------------------
     $connWrite->delete($tableShipping, array('marketplace_id = ?' => $marketplace->getId()));
     foreach ($details['shipping'] as $data) {
         $insertData = array('marketplace_id' => $marketplace->getId(), 'ebay_id' => $data['ebay_id'], 'title' => $data['title'], 'category' => json_encode($data['category']), 'is_flat' => $data['is_flat'], 'is_calculated' => $data['is_calculated'], 'is_international' => $data['is_international'], 'data' => json_encode($data['data']));
         $connWrite->insert($tableShipping, $insertData);
     }
     // ---------------------------------------
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:26,代码来源:Details.php

示例2: saveDetailsToDb

 protected function saveDetailsToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $details)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tableMarketplaces = Mage::getSingleton('core/resource')->getTableName('m2epro_amazon_dictionary_marketplace');
     $connWrite->delete($tableMarketplaces, array('marketplace_id = ?' => $marketplace->getId()));
     $data = array('marketplace_id' => $marketplace->getId(), 'nodes' => json_encode($details));
     $connWrite->insert($tableMarketplaces, $data);
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:9,代码来源:Details.php

示例3: saveDetailsToDb

 protected function saveDetailsToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $details)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tableMarketplaces = Mage::getSingleton('core/resource')->getTableName('m2epro_amazon_dictionary_marketplace');
     $connWrite->delete($tableMarketplaces, array('marketplace_id = ?' => $marketplace->getId()));
     $data = array('marketplace_id' => $marketplace->getId(), 'client_details_last_update_date' => isset($details['last_update']) ? $details['last_update'] : NULL, 'server_details_last_update_date' => isset($details['last_update']) ? $details['last_update'] : NULL, 'product_data' => isset($details['product_data']) ? json_encode($details['product_data']) : NULL, 'vocabulary' => isset($details['vocabulary']) ? json_encode($details['vocabulary']) : NULL);
     $connWrite->insert($tableMarketplaces, $data);
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:9,代码来源:Details.php

示例4: process

 public function process()
 {
     if (!is_null($this->account) && !is_null($this->marketplace)) {
         /** @var $amazonAccount Ess_M2ePro_Model_Amazon_Account */
         $amazonAccount = $this->account->getChildObject();
         $marketplaceDataTemp = $amazonAccount->getMarketplaceItem($this->marketplace->getId());
         if (!is_null($marketplaceDataTemp)) {
             $this->requestExtraData['account'] = $marketplaceDataTemp['server_hash'];
         }
     }
     parent::process();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:12,代码来源:Requester.php

示例5: setMarketplaceByOtherListingProduct

 protected function setMarketplaceByOtherListingProduct(Ess_M2ePro_Model_Listing_Other $otherListing)
 {
     if (!is_null($this->marketplace) && $this->marketplace->getId() == $otherListing->getMarketplaceId()) {
         return;
     }
     $this->marketplace = Mage::helper('M2ePro/Component_Amazon')->getObject('Marketplace', $otherListing->getMarketplaceId());
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:7,代码来源:Mapping.php

示例6: saveDetailsToDb

 protected function saveDetailsToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $details)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tableMarketplaces = Mage::getSingleton('core/resource')->getTableName('m2epro_amazon_dictionary_marketplace');
     $tableShippingOverride = Mage::getSingleton('core/resource')->getTableName('m2epro_amazon_dictionary_shipping_override');
     $connWrite->delete($tableMarketplaces, array('marketplace_id = ?' => $marketplace->getId()));
     $data = array('marketplace_id' => $marketplace->getId(), 'client_details_last_update_date' => isset($details['last_update']) ? $details['last_update'] : NULL, 'server_details_last_update_date' => isset($details['last_update']) ? $details['last_update'] : NULL, 'product_data' => isset($details['product_data']) ? json_encode($details['product_data']) : NULL);
     $connWrite->insert($tableMarketplaces, $data);
     Mage::helper('M2ePro/Component_Amazon_Vocabulary')->setServerData($details['vocabulary']);
     $connWrite->delete($tableShippingOverride, array('marketplace_id = ?' => $marketplace->getId()));
     foreach ($details['shipping_overrides'] as $data) {
         $insertData = array('marketplace_id' => $marketplace->getId(), 'location' => $data['location'], 'service' => $data['service'], 'option' => $data['option']);
         $connWrite->insert($tableShippingOverride, $insertData);
     }
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:16,代码来源:Details.php

示例7: setLocks

 public function setLocks($hash)
 {
     /** @var $lockItem Ess_M2ePro_Model_LockItem */
     $lockItem = Mage::getModel('M2ePro/LockItem');
     $tempNick = Ess_M2ePro_Model_Buy_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX;
     $tempNick .= '_' . $this->account->getId() . '_' . $this->marketplace->getId();
     $lockItem->setNick($tempNick);
     $lockItem->create();
     $this->account->addObjectLock(NULL, $hash);
     $this->account->addObjectLock('synchronization', $hash);
     $this->account->addObjectLock('synchronization_buy', $hash);
     $this->account->addObjectLock(Ess_M2ePro_Model_Buy_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
     $this->marketplace->addObjectLock(NULL, $hash);
     $this->marketplace->addObjectLock('synchronization', $hash);
     $this->marketplace->addObjectLock('synchronization_buy', $hash);
     $this->marketplace->addObjectLock(Ess_M2ePro_Model_Buy_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:17,代码来源:Requester.php

示例8: getResponserParams

 protected function getResponserParams()
 {
     $tempProductsData = array();
     foreach ($this->listingsProducts as $listingProduct) {
         $tempProductsData[$listingProduct->getId()] = isset($this->listingProductRequestsData[$listingProduct->getId()]) ? $this->listingProductRequestsData[$listingProduct->getId()] : array();
     }
     return array('account_id' => $this->account->getId(), 'marketplace_id' => $this->marketplace->getId(), 'logs_action_id' => $this->logsActionId, 'status_changer' => $this->params['status_changer'], 'params' => $this->params, 'products' => $tempProductsData);
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:8,代码来源:Multiple.php

示例9: setLocks

 public function setLocks($hash)
 {
     /** @var $lockItem Ess_M2ePro_Model_LockItem */
     $lockItem = Mage::getModel('M2ePro/LockItem');
     $lockItemPrefix = Ess_M2ePro_Model_Play_Synchronization_Tasks_Orders_Receive::LOCK_ITEM_PREFIX;
     $nick = $lockItemPrefix . '_' . $this->account->getId() . '_' . $this->marketplace->getId();
     $lockItem->setNick($nick);
     $lockItem->create();
     $this->account->addObjectLock(NULL, $hash);
     $this->account->addObjectLock('synchronization', $hash);
     $this->account->addObjectLock('synchronization_play', $hash);
     $this->account->addObjectLock($lockItemPrefix, $hash);
     $this->marketplace->addObjectLock(NULL, $hash);
     $this->marketplace->addObjectLock('synchronization', $hash);
     $this->marketplace->addObjectLock('synchronization_play', $hash);
     $this->marketplace->addObjectLock($lockItemPrefix, $hash);
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:17,代码来源:Requester.php

示例10: saveCategoriesToDb

 protected function saveCategoriesToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $categories)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tableCategories = Mage::getSingleton('core/resource')->getTableName('m2epro_ebay_dictionary_category');
     $connWrite->delete($tableCategories, array('marketplace_id = ?' => $marketplace->getId()));
     $iteration = 0;
     $iterationsForOneStep = 1000;
     $percentsForOneStep = $this->getPercentsInterval() / 2 / (count($categories) / $iterationsForOneStep);
     foreach ($categories as $data) {
         $insertData = array('marketplace_id' => $marketplace->getId(), 'category_id' => $data['category_id'], 'title' => $data['title'], 'parent_category_id' => $data['parent_id'], 'level' => $data['level'], 'is_leaf' => $data['is_leaf'], 'features' => json_encode($data['features']), 'attribute_set_id' => $data['attribute_set_id']);
         $connWrite->insert($tableCategories, $insertData);
         if (++$iteration % $iterationsForOneStep == 0) {
             $percentsShift = $iteration / $iterationsForOneStep * $percentsForOneStep;
             $this->getActualLockItem()->setPercents($this->getPercentsStart() + $this->getPercentsInterval() / 2 + $percentsShift);
         }
     }
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:18,代码来源:Categories.php

示例11: saveSpecificsToDb

 protected function saveSpecificsToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $specifics)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tableSpecifics = Mage::getSingleton('core/resource')->getTableName('m2epro_amazon_dictionary_specific');
     $connWrite->delete($tableSpecifics, array('marketplace_id = ?' => $marketplace->getId()));
     if (!count($specifics)) {
         return;
     }
     $iteration = 0;
     $iterationsForOneStep = 1000;
     $percentsForOneStep = $this->getPercentsInterval() / 2 / (count($specifics) / $iterationsForOneStep);
     foreach ($specifics as $data) {
         $insertData = array('marketplace_id' => $marketplace->getId(), 'specific_id' => $data['id'], 'parent_specific_id' => $data['parent_id'], 'xsd_hash' => $data['xsd_hash'], 'title' => $data['title'], 'xml_tag' => $data['xml_tag'], 'xpath' => $data['xpath'], 'type' => (int) $data['type'], 'values' => $data['values'], 'recommended_values' => $data['recommended_values'], 'params' => $data['params'], 'data_definition' => $data['data_definition'], 'min_occurs' => (int) $data['min_occurs'], 'max_occurs' => (int) $data['max_occurs']);
         $connWrite->insert($tableSpecifics, $insertData);
         if (++$iteration % $iterationsForOneStep == 0) {
             $percentsShift = $iteration / $iterationsForOneStep * $percentsForOneStep;
             $this->getActualLockItem()->setPercents($this->getPercentsStart() + $this->getPercentsInterval() / 2 + $percentsShift);
         }
     }
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:21,代码来源:Specifics.php

示例12: receiveFromEbay

 protected function receiveFromEbay(Ess_M2ePro_Model_Marketplace $marketplace, $partNumber)
 {
     $dispatcherObj = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher');
     $connectorObj = $dispatcherObj->getVirtualConnector('marketplace', 'get', 'motorsKtypes', array('part_number' => $partNumber), NULL, $marketplace->getId());
     $response = $dispatcherObj->process($connectorObj);
     if (is_null($response) || empty($response['data'])) {
         $response = array();
     }
     $dataCount = isset($response['data']) ? count($response['data']) : 0;
     $this->getActualOperationHistory()->addText("Total received parts from eBay: {$dataCount}");
     return $response;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:12,代码来源:MotorsKtypes.php

示例13: setLocks

 public function setLocks($hash)
 {
     /** @var $lockItem Ess_M2ePro_Model_LockItem */
     $lockItem = Mage::getModel('M2ePro/LockItem');
     $tempNick = Ess_M2ePro_Model_Play_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX;
     $tempNick .= '_' . $this->account->getId() . '_' . $this->marketplace->getId();
     $lockItem->setNick($tempNick);
     $lockItem->create();
     $this->account->addObjectLock(NULL, $hash);
     $this->account->addObjectLock('synchronization', $hash);
     $this->account->addObjectLock('synchronization_play', $hash);
     $this->account->addObjectLock(Ess_M2ePro_Model_Play_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
     $this->marketplace->addObjectLock(NULL, $hash);
     $this->marketplace->addObjectLock('synchronization', $hash);
     $this->marketplace->addObjectLock('synchronization_play', $hash);
     $this->marketplace->addObjectLock(Ess_M2ePro_Model_Play_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tempTable = Mage::getSingleton('core/resource')->getTableName('m2epro_play_processed_inventory');
     $connWrite->delete($tempTable, array('`hash` = ?' => (string) $hash));
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:21,代码来源:Requester.php

示例14: saveCategoriesToDb

 protected function saveCategoriesToDb(Ess_M2ePro_Model_Marketplace $marketplace, array $categories)
 {
     /** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
     $connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
     $tableCategories = Mage::getSingleton('core/resource')->getTableName('m2epro_amazon_dictionary_category');
     $connWrite->delete($tableCategories, array('marketplace_id = ?' => $marketplace->getId()));
     if (!count($categories)) {
         return;
     }
     $iteration = 0;
     $iterationsForOneStep = 1000;
     $percentsForOneStep = $this->getPercentsInterval() / 2 / (count($categories) / $iterationsForOneStep);
     foreach ($categories as $data) {
         $insertData = array('category_id' => $data['id'], 'marketplace_id' => $marketplace->getId(), 'parent_category_id' => $data['parent_id'], 'node_hash' => $data['node_hash'], 'xsd_hash' => $data['xsd_hash'], 'title' => $data['title'], 'path' => $data['path'], 'item_types' => $data['item_types'], 'browsenode_id' => $data['browsenode_id'], 'is_listable' => $data['is_listable'], 'sorder' => $data['sorder']);
         $connWrite->insert($tableCategories, $insertData);
         if (++$iteration % $iterationsForOneStep == 0) {
             $percentsShift = $iteration / $iterationsForOneStep * $percentsForOneStep;
             $this->getActualLockItem()->setPercents($this->getPercentsStart() + $this->getPercentsInterval() / 2 + $percentsShift);
         }
     }
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:21,代码来源:Categories.php

示例15: parseShippingAddress

 private function parseShippingAddress(array $shippingData, Ess_M2ePro_Model_Marketplace $marketplace)
 {
     $location = isset($shippingData['location']) ? $shippingData['location'] : array();
     $address = isset($shippingData['address']) ? $shippingData['address'] : array();
     $parsedAddress = array('county' => isset($location['county']) ? trim($location['county']) : '', 'country_code' => isset($location['country_code']) ? trim($location['country_code']) : '', 'state' => isset($location['state']) ? trim($location['state']) : '', 'city' => isset($location['city']) ? trim($location['city']) : '', 'postal_code' => isset($location['postal_code']) ? $location['postal_code'] : '', 'recipient_name' => isset($shippingData['buyer']) ? trim($shippingData['buyer']) : '', 'phone' => isset($shippingData['phone']) ? $shippingData['phone'] : '', 'company' => '', 'street' => array(isset($address['first']) ? $address['first'] : '', isset($address['second']) ? $address['second'] : '', isset($address['third']) ? $address['third'] : ''));
     $parsedAddress['street'] = array_filter($parsedAddress['street']);
     $group = '/amazon/order/settings/marketplace_' . $marketplace->getId() . '/';
     $useFirstStreetLineAsCompany = Mage::helper('M2ePro/Module')->getConfig()->getGroupValue($group, 'use_first_street_line_as_company');
     if ($useFirstStreetLineAsCompany && count($parsedAddress['street']) > 1) {
         $parsedAddress['company'] = array_shift($parsedAddress['street']);
     }
     return $parsedAddress;
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:13,代码来源:ItemsResponser.php


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