本文整理汇总了PHP中Ess_M2ePro_Model_Account类的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Account类的具体用法?PHP Ess_M2ePro_Model_Account怎么用?PHP Ess_M2ePro_Model_Account使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Ess_M2ePro_Model_Account类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Ess_M2ePro_Model_Account $account)
{
if (!$account->isComponentModeAmazon()) {
throw new Ess_M2ePro_Model_Exception_Logic('Required Amazon Account.');
}
$this->account = $account;
}
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:7,代码来源:Repricing.php
示例2: 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
示例3: 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
示例4: processAccount
private function processAccount(Ess_M2ePro_Model_Account $account, $percentsForAccount)
{
//---------------------------
$this->_profiler->addEol();
$this->_profiler->addTitle('Starting account "' . $account->getTitle() . '"');
// ->__('Task "%s" for eBay account: "%s" is started. Please wait...')
$status = 'Task "%s" for eBay account: "%s" is started. Please wait...';
$status = Mage::helper('M2ePro')->__($status, $this->name, $account->getTitle());
$this->_lockItem->setStatus($status);
$currentPercent = $this->_lockItem->getPercents();
//---------------------------
$collection = Mage::helper('M2ePro/Component_Ebay')->getCollection('Order')->addFieldToFilter('account_id', $account->getId())->addFieldToFilter('reservation_state', Ess_M2ePro_Model_Order_Reserve::STATE_PLACED);
$reservationDays = (int) $account->getChildObject()->getQtyReservationDays();
if ($reservationDays > 0) {
$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));
}
/** @var $reservedOrders Ess_M2ePro_Model_Order[] */
$reservedOrders = $collection->getItems();
//---------------------------
$this->_profiler->addEol();
$this->_profiler->addTitle('Total orders with expired reservation: ' . count($reservedOrders));
$currentPercent = $currentPercent + $percentsForAccount * 0.1;
$this->_lockItem->setPercents($currentPercent);
$this->_lockItem->activate();
//---------------------------
if (count($reservedOrders) == 0) {
return;
}
//---------------------------
$this->_profiler->addTimePoint(__METHOD__ . 'process' . $account->getId(), 'Release qty for expired reservation');
$status = 'Task "%s" for eBay account: "%s" is in data processing state. Please wait...';
$status = Mage::helper('M2ePro')->__($status, $account->getTitle());
$this->_lockItem->setStatus($status);
//---------------------------
$percentPerOrder = ($percentsForAccount - $currentPercent) / count($reservedOrders);
$tempPercent = 0;
foreach ($reservedOrders as $order) {
$order->getReserve()->release();
$tempPercent += $percentPerOrder;
if (floor($tempPercent) > 0) {
$currentPercent += floor($tempPercent);
$tempPercent -= floor($tempPercent);
$this->_lockItem->setPercents($currentPercent);
$this->_lockItem->activate();
}
}
//---------------------------
$this->_profiler->saveTimePoint(__METHOD__ . 'process' . $account->getId());
$this->_profiler->addEol();
$this->_profiler->addTitle('End account "' . $account->getTitle() . '"');
//---------------------------
}
开发者ID:technomagegithub,项目名称:magento,代码行数:55,代码来源:Cancellation.php
示例5: 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
示例6: processAccount
private function processAccount(Ess_M2ePro_Model_Account $account)
{
$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();
}
$dispatcherObject = Mage::getModel('M2ePro/Connector_Amazon_Dispatcher');
$connectorObj = $dispatcherObject->getConnector('orders', 'receive', 'requester', $params, $account, 'Ess_M2ePro_Model_Amazon_Synchronization');
$dispatcherObject->process($connectorObj);
}
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:11,代码来源:Receive.php
示例7: processAccount
private function processAccount(Ess_M2ePro_Model_Account $account)
{
$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();
}
$entity = 'orders';
$type = 'receive';
$name = 'requester';
$prefix = 'Ess_M2ePro_Model_Amazon_Synchronization';
$dispatcherObject = Mage::getModel('M2ePro/Connector_Amazon_Dispatcher');
$dispatcherObject->processConnector($entity, $type, $name, $params, $account, $prefix);
}
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:14,代码来源:Receive.php
示例8: processPlayOrders
private function processPlayOrders($response, Ess_M2ePro_Model_Account $account)
{
$ordersLastSynchronization = $account->getData('orders_last_synchronization');
$orders = array();
foreach ($response as $orderData) {
$currentOrderDate = $orderData['purchase_create_date'];
if (strtotime($currentOrderDate) > strtotime($ordersLastSynchronization)) {
$ordersLastSynchronization = $currentOrderDate;
}
/** @var $orderBuilder Ess_M2ePro_Model_Play_Order_Builder */
$orderBuilder = Mage::getModel('M2ePro/Play_Order_Builder');
$orderBuilder->initialize($account, $orderData);
$order = $orderBuilder->process();
$orders[] = $order;
}
$account->setData('orders_last_synchronization', $ordersLastSynchronization)->save();
return $orders;
}
开发者ID:ppkowalski,项目名称:M2E,代码行数:18,代码来源:Responser.php
示例9: processAmazonOrders
private function processAmazonOrders($response, Ess_M2ePro_Model_Account $account)
{
/** @var Ess_M2ePro_Model_Amazon_Account $amazonAccount */
$amazonAccount = $account->getChildObject();
$ordersLastSynchronization = $amazonAccount->getData('orders_last_synchronization');
$orders = array();
foreach ($response as $orderData) {
$currentOrderUpdateDate = $orderData['purchase_update_date'];
if (strtotime($currentOrderUpdateDate) > strtotime($ordersLastSynchronization)) {
$ordersLastSynchronization = $currentOrderUpdateDate;
}
/** @var $orderBuilder Ess_M2ePro_Model_Amazon_Order_Builder */
$orderBuilder = Mage::getModel('M2ePro/Amazon_Order_Builder');
$orderBuilder->initialize($account, $orderData);
$order = $orderBuilder->process();
if (!$order) {
continue;
}
$orders[] = $order;
}
$amazonAccount->setData('orders_last_synchronization', $ordersLastSynchronization)->save();
return $orders;
}
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:23,代码来源:Responser.php
示例10: updateReceivedTitles
private function updateReceivedTitles(array $responseData, Ess_M2ePro_Model_Account $account)
{
if (!isset($responseData['items']) || !is_array($responseData['items'])) {
return;
}
/** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
$connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
$aloTable = Mage::getResourceModel('M2ePro/Amazon_Listing_Other')->getMainTable();
$lolTable = Mage::getResourceModel('M2ePro/Listing_Other_Log')->getMainTable();
/** @var $mappingModel Ess_M2ePro_Model_Amazon_Listing_Other_Mapping */
$mappingModel = Mage::getModel('M2ePro/Amazon_Listing_Other_Mapping');
/** @var $movingModel Ess_M2ePro_Model_Amazon_Listing_Other_Moving */
$movingModel = Mage::getModel('M2ePro/Amazon_Listing_Other_Moving');
$receivedItems = array();
foreach ($responseData['items'] as $generalId => $item) {
if ($item == false) {
continue;
}
$item = array_shift($item);
$title = $item['title'];
if (isset($receivedItems[$generalId]) || empty($title)) {
continue;
}
$receivedItems[$generalId] = $title;
$listingsOthersWithEmptyTitles = array();
if ($account->getChildObject()->isOtherListingsMappingEnabled()) {
/** @var $listingOtherCollection Mage_Core_Model_Mysql4_Collection_Abstract */
$listingOtherCollection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Listing_Other')->addFieldToFilter('main_table.account_id', (int) $account->getId())->addFieldToFilter('second_table.general_id', (int) $generalId)->addFieldToFilter('second_table.title', array('null' => true));
$listingsOthersWithEmptyTitles = $listingOtherCollection->getItems();
}
$connWrite->update($aloTable, array('title' => (string) $title), array('general_id = ?' => (string) $generalId));
$connWrite->update($lolTable, array('title' => (string) $title), array('identifier = ?' => (string) $generalId, 'component_mode = ?' => Ess_M2ePro_Helper_Component_Amazon::NICK));
if (count($listingsOthersWithEmptyTitles) > 0) {
foreach ($listingsOthersWithEmptyTitles as $listingOtherModel) {
$listingOtherModel->setData('title', (string) $title);
$listingOtherModel->getChildObject()->setData('title', (string) $title);
$mappingModel->initialize($account);
$mappingResult = $mappingModel->autoMapOtherListingProduct($listingOtherModel);
if ($mappingResult) {
if (!$account->getChildObject()->isOtherListingsMoveToListingsEnabled()) {
continue;
}
$movingModel->initialize($account);
$movingModel->autoMoveOtherListingProduct($listingOtherModel);
}
}
}
}
}
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:49,代码来源:Title.php
示例11: 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
示例12: updateAccountMarketplace
private function updateAccountMarketplace(Ess_M2ePro_Model_Account $accountObj, Ess_M2ePro_Model_Marketplace $marketplaceObj)
{
$this->_profiler->addTitle('Starting account "' . $accountObj->getTitle() . '" and marketplace "' . $marketplaceObj->getTitle() . '"');
$this->_profiler->addTimePoint(__METHOD__ . 'send' . $accountObj->getId(), 'Get inventory from Amazon');
$tempString = 'Task "3rd Party Listings Synchronization" for Amazon account: ';
$tempString .= '"%s" and marketplace "%s" is started. Please wait...';
$this->_lockItem->setStatus(Mage::helper('M2ePro')->__($tempString, $accountObj->getTitle(), $marketplaceObj->getTitle()));
// Get all changes on Amazon for account
//---------------------------
$dispatcherObject = Mage::getModel('M2ePro/Connector_Server_Amazon_Dispatcher');
$dispatcherObject->processConnector('tasks', 'otherListings', 'requester', array(), $marketplaceObj, $accountObj, 'Ess_M2ePro_Model_Amazon_Synchronization');
//---------------------------
$this->_profiler->saveTimePoint(__METHOD__ . 'send' . $accountObj->getId());
$this->_profiler->addEol();
}
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:15,代码来源:OtherListings.php
示例13: getRelatedChanges
/**
* @param Ess_M2ePro_Model_Account $account
* @return Ess_M2ePro_Model_Order_Change
*/
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(10);
$changesCollection->addFieldToFilter('component', Ess_M2ePro_Helper_Component_Amazon::NICK);
$changesCollection->addFieldToFilter('action', Ess_M2ePro_Model_Order_Change::ACTION_REFUND);
$changesCollection->setPageSize(self::MAX_UPDATES_PER_TIME);
$changesCollection->getSelect()->group(array('order_id'));
return $changesCollection->getItems();
}
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:16,代码来源:Refund.php
示例14: updateAccount
private function updateAccount(Ess_M2ePro_Model_Account $account)
{
$this->_profiler->addTitle('Starting account "' . $account->getTitle() . '"');
$this->_profiler->addTimePoint(__METHOD__ . 'send' . $account->getId(), 'Get orders from Amazon');
//->__('Task "%s" for Amazon account: "%s" is started. Please wait...')
$status = 'Task "%s" for Amazon account: "%s" is started. Please wait...';
$status = Mage::helper('M2ePro')->__($status, $this->name, $account->getTitle());
$this->_lockItem->setStatus($status);
// Get orders from Amazon for account
//---------------------------
$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();
}
$entity = 'tasks';
$type = 'orders';
$name = 'requester';
$prefix = 'Ess_M2ePro_Model_Amazon_Synchronization';
$dispatcherObject = Mage::getModel('M2ePro/Connector_Amazon_Dispatcher');
$dispatcherObject->processConnector($entity, $type, $name, $params, $account, $prefix);
//---------------------------
$this->_profiler->saveTimePoint(__METHOD__ . 'send' . $account->getId());
$this->_profiler->addEol();
}
开发者ID:technomagegithub,项目名称:magento,代码行数:25,代码来源:Orders.php
示例15: receiveChangesFromEbay
private function receiveChangesFromEbay(Ess_M2ePro_Model_Account $account, array $paramsConnector = array())
{
$dispatcherObj = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher');
$connectorObj = $dispatcherObj->getVirtualConnector('item', 'get', 'changes', $paramsConnector, NULL, NULL, $account->getId(), NULL);
$response = $dispatcherObj->process($connectorObj);
$this->processResponseMessages($connectorObj);
if (!isset($response['items']) || !isset($response['to_time'])) {
return NULL;
}
return $response;
}
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:11,代码来源:UpdateListingsProducts.php
示例16: 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(), 'Update orders on eBay');
$status = 'Task "%s" for eBay "%s" Account is started. Please wait...';
$status = Mage::helper('M2ePro')->__($status, $this->name, $account->getTitle());
$this->_lockItem->setStatus($status);
$changesCollection = Mage::getModel('M2ePro/Order_Change')->getCollection();
$changesCollection->addAccountFilter($account->getId());
$changesCollection->addProcessingAttemptDateFilter();
$changesCollection->setPageSize(200);
$changesCollection->getSelect()->group(array('order_id'));
if ($changesCollection->getSize() == 0) {
return;
}
// Update orders status on eBay
//---------------------------
foreach ($changesCollection as $change) {
Mage::getResourceModel('M2ePro/Order_Change')->incrementAttemptCount(array($change->getId()));
$this->processChange($change);
}
//---------------------------
$this->_profiler->saveTimePoint(__METHOD__ . 'send' . $account->getId());
$this->_profiler->addEol();
}
开发者ID:technomagegithub,项目名称:magento,代码行数:27,代码来源:Update.php
示例17: updateAccountMarketplace
private function updateAccountMarketplace(Ess_M2ePro_Model_Account $accountObj, Ess_M2ePro_Model_Marketplace $marketplaceObj)
{
$this->_profiler->addTitle('Starting account "' . $accountObj->getTitle() . '" and marketplace "' . $marketplaceObj->getTitle() . '"');
$this->_profiler->addTimePoint(__METHOD__ . 'send' . $accountObj->getId(), 'Get orders from Amazon');
//->__('Task "Orders Synchronization" for Amazon account: "%s" and marketplace "%s" is started. Please wait...')
$tempString = 'Task "Orders Synchronization" for Amazon account: ';
$tempString .= '"%s" and marketplace "%s" is started. Please wait...';
$this->_lockItem->setStatus(Mage::helper('M2ePro')->__($tempString, $accountObj->getTitle(), $marketplaceObj->getTitle()));
// Get orders from Amazon for account
//---------------------------
$fromDate = $this->prepareFromDate($accountObj->getData('orders_last_synchronization'));
$params = array('from_date' => $fromDate);
if (is_null($accountObj->getData('orders_last_synchronization'))) {
$accountObj->setData('orders_last_synchronization', $fromDate)->save();
}
$dispatcherObject = Mage::getModel('M2ePro/Amazon_Connector')->getDispatcher();
$dispatcherObject->processConnector('tasks', 'orders', 'requester', $params, $marketplaceObj, $accountObj, 'Ess_M2ePro_Model_Amazon_Synchronization');
//---------------------------
$this->_profiler->saveTimePoint(__METHOD__ . 'send' . $accountObj->getId());
$this->_profiler->addEol();
}
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:21,代码来源:Orders.php
示例18: receiveFromEbay
protected function receiveFromEbay(Ess_M2ePro_Model_Account $account, array $paramsConnector = array())
{
$dispatcherObj = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher');
$connectorObj = $dispatcherObj->getVirtualConnector('feedback', 'get', 'entity', $paramsConnector, 'feedbacks', NULL, $account->getId(), NULL);
$feedbacks = $dispatcherObj->process($connectorObj);
$this->processResponseMessages($connectorObj);
is_null($feedbacks) && ($feedbacks = array());
$countNewFeedbacks = 0;
foreach ($feedbacks as $feedback) {
$dbFeedback = array('account_id' => $account->getId(), 'ebay_item_id' => $feedback['item_id'], 'ebay_transaction_id' => $feedback['transaction_id']);
if ($feedback['item_title'] != '') {
$dbFeedback['ebay_item_title'] = $feedback['item_title'];
}
if ($feedback['from_role'] == Ess_M2ePro_Model_Ebay_Feedback::ROLE_BUYER) {
$dbFeedback['buyer_name'] = $feedback['user_sender'];
$dbFeedback['buyer_feedback_id'] = $feedback['id'];
$dbFeedback['buyer_feedback_text'] = $feedback['info']['text'];
$dbFeedback['buyer_feedback_date'] = $feedback['info']['date'];
$dbFeedback['buyer_feedback_type'] = $feedback['info']['type'];
} else {
$dbFeedback['seller_feedback_id'] = $feedback['id'];
$dbFeedback['seller_feedback_text'] = $feedback['info']['text'];
$dbFeedback['seller_feedback_date'] = $feedback['info']['date'];
$dbFeedback['seller_feedback_type'] = $feedback['info']['type'];
}
$existFeedback = Mage::getModel('M2ePro/Ebay_Feedback')->getCollection()->addFieldToFilter('account_id', $account->getId())->addFieldToFilter('ebay_item_id', $feedback['item_id'])->addFieldToFilter('ebay_transaction_id', $feedback['transaction_id'])->getFirstItem();
if (!is_null($existFeedback->getId())) {
if ($feedback['from_role'] == Ess_M2ePro_Model_Ebay_Feedback::ROLE_BUYER && !$existFeedback->getData('buyer_feedback_id')) {
$countNewFeedbacks++;
}
if ($feedback['from_role'] == Ess_M2ePro_Model_Ebay_Feedback::ROLE_SELLER && !$existFeedback->getData('seller_feedback_id')) {
$countNewFeedbacks++;
}
} else {
$countNewFeedbacks++;
}
$existFeedback->addData($dbFeedback)->save();
}
return array('total' => count($feedbacks), 'new' => $countNewFeedbacks);
}
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:40,代码来源:Receive.php
示例19: 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
示例20: process
public function process()
{
if (!is_null($this->account)) {
$this->requestExtraData['account'] = $this->account->getChildObject()->getServerHash();
}
parent::process();
}
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:7,代码来源:Requester.php
注:本文中的Ess_M2ePro_Model_Account类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论