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


PHP Ess_M2ePro_Model_Account::getId方法代码示例

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


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

示例1: setAccountByOtherListingProduct

 protected function setAccountByOtherListingProduct(Ess_M2ePro_Model_Listing_Other $otherListing)
 {
     if (!is_null($this->account) && $this->account->getId() == $otherListing->getAccountId()) {
         return;
     }
     $this->account = Mage::helper('M2ePro/Component_Buy')->getCachedObject('Account', $otherListing->getAccountId());
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:7,代码来源:Moving.php

示例2: 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

示例3: setAccountByOtherListingProduct

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

示例4: 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

示例5: isLockedAccount

 private function isLockedAccount(Ess_M2ePro_Model_Account $account)
 {
     /** @var $lockItem Ess_M2ePro_Model_LockItem */
     $lockItem = Mage::getModel('M2ePro/LockItem');
     $lockItem->setNick(self::LOCK_ITEM_PREFIX . '_' . $account->getId());
     $lockItem->setMaxInactiveTime(Ess_M2ePro_Model_Processing_Request::MAX_LIFE_TIME_INTERVAL);
     return $lockItem->isExist();
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:8,代码来源:UpdateDefectedListingsProducts.php

示例6: getRelatedChanges

 private function getRelatedChanges(Ess_M2ePro_Model_Account $account)
 {
     /** @var Ess_M2ePro_Model_Mysql4_Order_Change_Collection $changesCollection */
     $changesCollection = Mage::getModel('M2ePro/Order_Change')->getCollection();
     $changesCollection->addAccountFilter($account->getId());
     $changesCollection->addProcessingAttemptDateFilter();
     $changesCollection->setPageSize(self::MAX_UPDATES_PER_TIME);
     $changesCollection->getSelect()->group(array('order_id'));
     return $changesCollection->getItems();
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:10,代码来源:Update.php

示例7: getOrdersForRelease

 private function getOrdersForRelease(Ess_M2ePro_Model_Account $account)
 {
     /** @var Ess_M2ePro_Model_Mysql4_Order_Collection $collection */
     $collection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Order')->addFieldToFilter('account_id', $account->getId())->addFieldToFilter('reservation_state', Ess_M2ePro_Model_Order_Reserve::STATE_PLACED);
     $reservationDays = (int) $account->getChildObject()->getQtyReservationDays();
     $minReservationStartDate = new DateTime(Mage::helper('M2ePro')->getCurrentGmtDate(), new DateTimeZone('UTC'));
     $minReservationStartDate->modify('- ' . $reservationDays . ' days');
     $minReservationStartDate = $minReservationStartDate->format('Y-m-d H:i');
     $collection->addFieldToFilter('reservation_start_date', array('lteq' => $minReservationStartDate));
     return $collection->getItems();
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:11,代码来源:Cancellation.php

示例8: 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

示例9: receiveFromEbay

 public static function receiveFromEbay(Ess_M2ePro_Model_Account $account, array $paramsConnector = array())
 {
     // Create connector
     //-----------------------
     $messages = Mage::getModel('M2ePro/Connector_Server_Ebay_Dispatcher')->processVirtualAbstract('message', 'get', 'memberList', $paramsConnector, 'messages', NULL, $account->getId(), NULL);
     is_null($messages) && ($messages = array());
     //-----------------------
     // Get new messages
     //-----------------------
     $countNewMessages = 0;
     foreach ($messages as $message) {
         $dbMessage = array('account_id' => $account->getId(), 'ebay_item_id' => $message['item_id'], 'ebay_item_title' => $message['item_title'], 'sender_name' => $message['sender_name'], 'message_id' => $message['id'], 'message_subject' => $message['subject'], 'message_text' => $message['body'], 'message_date' => $message['creation_date'], 'message_type' => $message['type']);
         if (isset($message['responses'])) {
             $dbMessage['message_responses'] = json_encode($message['responses'], JSON_FORCE_OBJECT);
         }
         $existMessage = Mage::getModel('M2ePro/Ebay_Message')->getCollection()->addFieldToFilter('account_id', $account->getId())->addFieldToFilter('message_id', $message['id'])->getFirstItem();
         if (is_null($existMessage->getId())) {
             $countNewMessages++;
         }
         $existMessage->addData($dbMessage)->save();
     }
     //-----------------------
     return array('new' => $countNewMessages, 'total' => count($messages));
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:24,代码来源:Message.php

示例10: processAccount

 private function processAccount(Ess_M2ePro_Model_Account $account)
 {
     $title = 'Starting account "%s"';
     $title = sprintf($title, $account->getTitle());
     $this->_profiler->addTitle($title);
     $this->_profiler->addTimePoint(__METHOD__ . 'send' . $account->getId(), 'Get orders from Play');
     $status = 'Task "%s" for Play.com "%s" Account is started. Please wait...';
     $status = Mage::helper('M2ePro')->__($status, $this->name, $account->getTitle());
     $this->_lockItem->setStatus($status);
     //------------------------------
     $fromDate = $this->prepareFromDate($account->getData('orders_last_synchronization'));
     $params = array('from_date' => $fromDate);
     if (is_null($account->getData('orders_last_synchronization'))) {
         $account->setData('orders_last_synchronization', $fromDate)->save();
     }
     //------------------------------
     // Get open orders from Play.com for account
     //---------------------------
     /** @var $dispatcherObject Ess_M2ePro_Model_Connector_Play_Dispatcher */
     $dispatcherObject = Mage::getModel('M2ePro/Connector_Play_Dispatcher');
     $prefix = 'Ess_M2ePro_Model_Play_Synchronization';
     $dispatcherObject->processConnector('tasks', 'orders_receive', 'requester', $params, $account, $prefix);
     //---------------------------
     $this->_profiler->saveTimePoint(__METHOD__ . 'send' . $account->getId());
     $this->_profiler->addEol();
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:26,代码来源:Receive.php

示例11: associateAndUpdateOrder

 private function associateAndUpdateOrder(Ess_M2ePro_Model_Account $account, array $orderData)
 {
     /** @var $order Ess_M2ePro_Model_Order */
     $order = Mage::helper('M2ePro/Component_Ebay')->getCollection('Order')->addFieldToFilter('account_id', $account->getId())->addFieldToFilter('ebay_order_id', $orderData['ebay_order_id'])->getFirstItem();
     if (!$order->getId()) {
         return null;
     }
     $order->setAccount($account);
     /** @var $helper Ess_M2ePro_Model_Ebay_Order_Helper */
     $helper = Mage::getSingleton('M2ePro/Ebay_Order_Helper');
     $checkoutStatus = $helper->getCheckoutStatus($orderData['checkout_status']);
     $paymentStatus = $helper->getPaymentStatus($orderData['payment_method'], $orderData['payment_date'], $orderData['payment_status_ebay']);
     $shippingStatus = $helper->getShippingStatus($orderData['shipping_date'], $orderData['shipping_method_selected']);
     if ($paymentStatus == Ess_M2ePro_Model_Ebay_Order::PAYMENT_STATUS_COMPLETED) {
         $paymentMethodName = $helper->getPaymentMethodNameByCode($orderData['payment_method'], $order->getMarketplaceId());
         $order->setData('payment_status', $paymentStatus);
         $order->setData('payment_method', $paymentMethodName);
     }
     if (!$order->getChildObject()->isCheckoutCompleted() && $checkoutStatus == Ess_M2ePro_Model_Ebay_Order::CHECKOUT_STATUS_COMPLETED) {
         $shippingMethodName = $helper->getShippingMethodNameByCode($orderData['shipping_method'], $order->getMarketplaceId());
         $order->setData('tax_rate', (double) $orderData['tax_rate']);
         $order->setData('tax_state', $orderData['tax_state']);
         $order->setData('tax_amount', (double) $orderData['tax_amount']);
         $order->setData('tax_includes_shipping', (int) $orderData['tax_includes_shipping']);
         $order->setData('shipping_address', json_encode($orderData['shipping_address']));
         $order->setData('shipping_status', $shippingStatus);
         $order->setData('shipping_method', $shippingMethodName);
         $order->setData('shipping_price', (double) $orderData['shipping_price']);
     }
     $order->save();
     return $order;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:32,代码来源:Cancellation.php

示例12: receiveFromEbay

 protected function receiveFromEbay(Ess_M2ePro_Model_Marketplace $marketplace, Ess_M2ePro_Model_Account $account)
 {
     $policies = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher')->processVirtual('account', 'get', 'policies', array(), 'policies', $marketplace->getId(), $account->getId(), NULL);
     is_null($policies) && ($policies = array());
     $this->getActualOperationHistory()->addText('Total received policies from eBay: ' . count($policies));
     return $policies;
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:7,代码来源:Receive.php

示例13: receiveFromEbay

 private function receiveFromEbay(Ess_M2ePro_Model_Account $account, array $paramsConnector = array())
 {
     $response = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher')->processVirtual('item', 'get', 'changes', $paramsConnector, NULL, NULL, $account->getId(), NULL);
     if (!isset($response['items']) || !isset($response['to_time'])) {
         return NULL;
     }
     return $response;
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:8,代码来源:UpdateListingsProducts.php

示例14: processAccountMarketplace

 private function processAccountMarketplace(Ess_M2ePro_Model_Account $account, Ess_M2ePro_Model_Marketplace $marketplace)
 {
     $title = 'Starting account "' . $account->getTitle() . '" and marketplace "' . $marketplace->getTitle() . '"';
     $this->_profiler->addTitle($title);
     $this->_profiler->addTimePoint(__METHOD__ . 'send' . $account->getId(), 'Update orders on Buy');
     $statusString = 'Task "Orders Update Synchronization" for Rakuten.com "%s" Account and "%s" marketplace ';
     $statusString .= 'is started. Please wait...';
     $status = Mage::helper('M2ePro')->__($statusString, $account->getTitle(), $marketplace->getTitle());
     $this->_lockItem->setStatus($status);
     $changesCollection = Mage::getModel('M2ePro/Order_Change')->getCollection();
     $changesCollection->addAccountFilter($account->getId());
     $changesCollection->addFieldToFilter('action', Ess_M2ePro_Model_Order_Change::ACTION_UPDATE_SHIPPING);
     if ($changesCollection->getSize() == 0) {
         return;
     }
     // Update orders shipping status on Rakuten.com
     //---------------------------
     $params = array();
     foreach ($changesCollection as $change) {
         $changeParams = $change->getParams();
         $params[] = array('order_id' => $change->getOrderId(), 'buy_order_id' => $changeParams['buy_order_id'], 'buy_order_item_id' => $changeParams['buy_order_item_id'], 'qty' => $changeParams['qty'], 'tracking_type' => $changeParams['tracking_type'], 'tracking_number' => $changeParams['tracking_number'], 'ship_date' => $changeParams['ship_date']);
     }
     /** @var $dispatcherObject Ess_M2ePro_Model_Connector_Server_Buy_Dispatcher */
     $dispatcherObject = Mage::getModel('M2ePro/Buy_Connector')->getDispatcher();
     $dispatcherObject->processConnector('orders', 'update', 'shipping', $params, $marketplace, $account);
     $changesCollection->walk('delete');
     //---------------------------
     $this->_profiler->saveTimePoint(__METHOD__ . 'send' . $account->getId());
     $this->_profiler->addEol();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:30,代码来源:Update.php

示例15: receiveSkusFromEbay

 private function receiveSkusFromEbay(Ess_M2ePro_Model_Account $account, $sinceTime)
 {
     $sinceTime = new DateTime($sinceTime, new DateTimeZone('UTC'));
     $sinceTime->modify('-1 minute');
     $sinceTime = $sinceTime->format('Y-m-d H:i:s');
     $inputData = array('since_time' => $sinceTime, 'only_one_page' => true);
     $dispatcherObj = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher');
     $connectorObj = $dispatcherObj->getVirtualConnector('item', 'get', 'all', $inputData, NULL, NULL, $account->getId(), NULL);
     $responseData = $dispatcherObj->process($connectorObj);
     if (!isset($responseData['items']) || !is_array($responseData['items'])) {
         return array();
     }
     return $responseData;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:14,代码来源:Sku.php


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