本文整理汇总了PHP中Ess_M2ePro_Model_Listing_Other::getComponentMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Listing_Other::getComponentMode方法的具体用法?PHP Ess_M2ePro_Model_Listing_Other::getComponentMode怎么用?PHP Ess_M2ePro_Model_Listing_Other::getComponentMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ess_M2ePro_Model_Listing_Other
的用法示例。
在下文中一共展示了Ess_M2ePro_Model_Listing_Other::getComponentMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logOtherListingMessage
private function logOtherListingMessage(Ess_M2ePro_Model_Listing_Other $otherListing, $action, $oldValue, $newValue)
{
// M2ePro_TRANSLATIONS
// From [%from%] to [%to%].
$log = Mage::getModel('M2ePro/Listing_Other_Log');
$log->setComponentMode($otherListing->getComponentMode());
$log->addProductMessage($otherListing->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%]', array('from' => $oldValue, 'to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
}
示例2: logOtherListingMessage
private function logOtherListingMessage(Ess_M2ePro_Model_Listing_Other $otherListing, $action, $oldValue, $newValue, $messagePostfix = '')
{
// M2ePro_TRANSLATIONS
// From [%from%] to [%to%].
$log = Mage::getModel('M2ePro/Listing_Other_Log');
$log->setComponentMode($otherListing->getComponentMode());
$oldValue = strlen($oldValue) > 150 ? substr($oldValue, 0, 150) . ' ...' : $oldValue;
$newValue = strlen($newValue) > 150 ? substr($newValue, 0, 150) . ' ...' : $newValue;
$messagePostfix = trim(trim($messagePostfix), '.');
if (!empty($messagePostfix)) {
$messagePostfix = ' ' . $messagePostfix;
}
$log->addProductMessage($otherListing->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%]' . $messagePostfix . '.', array('!from' => $oldValue, '!to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
}