本文整理汇总了PHP中Ess_M2ePro_Model_Listing_Product::getSynchStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Listing_Product::getSynchStatus方法的具体用法?PHP Ess_M2ePro_Model_Listing_Product::getSynchStatus怎么用?PHP Ess_M2ePro_Model_Listing_Product::getSynchStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ess_M2ePro_Model_Listing_Product
的用法示例。
在下文中一共展示了Ess_M2ePro_Model_Listing_Product::getSynchStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isMeetListRequirements
//.........这里部分代码省略.........
$productQty = (int) $amazonListingProduct->getQty(true);
}
$typeQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueType();
$minQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueMin();
$maxQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueMax();
$note = '';
if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_LESS) {
if ($productQty <= $minQty) {
$result = true;
} else {
// M2ePro_TRANSLATIONS
// Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity“ is set to less then %template_min_qty%.
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Magento Quantity“ is set to less then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_MORE) {
if ($productQty >= $minQty) {
$result = true;
} else {
// M2ePro_TRANSLATIONS
// Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity” is set to more then %template_min_qty%.
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Magento Quantity” is set to more then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_BETWEEN) {
if ($productQty >= $minQty && $productQty <= $maxQty) {
$result = true;
} else {
// M2ePro_TRANSLATIONS
// Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity” is set between %template_min_qty% and %template_max_qty%.
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Magento Quantity” is set between %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if (!$result) {
if (!empty($note)) {
$additionalData['synch_template_list_rules_note'] = $note;
$listingProduct->setSettings('additional_data', $additionalData)->save();
}
return false;
}
}
if ($amazonSynchronizationTemplate->isListWhenQtyCalculatedHasValue() && !$variationManager->isRelationParentType()) {
$result = false;
$productQty = (int) $amazonListingProduct->getQty(false);
$typeQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueType();
$minQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueMin();
$maxQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueMax();
$note = '';
if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_LESS) {
if ($productQty <= $minQty) {
$result = true;
} else {
// M2ePro_TRANSLATIONS
// Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set to less then %template_min_qty%.
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Calculated Quantity” is set to less then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_MORE) {
if ($productQty >= $minQty) {
$result = true;
} else {
// M2ePro_TRANSLATIONS
// Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set to more then %template_min_qty%.
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Calculated Quantity” is set to more then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_BETWEEN) {
if ($productQty >= $minQty && $productQty <= $maxQty) {
$result = true;
} else {
// M2ePro_TRANSLATIONS
// Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set between %template_min_qty% and %template_max_qty%.
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Calculated Quantity” is set between %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if (!$result) {
if (!empty($note)) {
$additionalData['synch_template_list_rules_note'] = $note;
$listingProduct->setSettings('additional_data', $additionalData)->save();
}
return false;
}
}
if ($listingProduct->getSynchStatus() != Ess_M2ePro_Model_Listing_Product::SYNCH_STATUS_NEED && $this->isTriedToList($listingProduct) && $this->isChangeInitiatorOnlyInspector($listingProduct)) {
return false;
}
return true;
}
示例2: isMeetListRequirements
//.........这里部分代码省略.........
if (!is_null($temp) && $temp) {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Stock Availability of Magento Product Variation is Out of Stock though
in Synchronization Rules “Stock Availability” is set to In Stock.', array('date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
$additionalData['synch_template_list_rules_note'] = $note;
$listingProduct->setSettings('additional_data', $additionalData)->save();
return false;
}
}
}
}
if ($ebaySynchronizationTemplate->isListWhenQtyMagentoHasValue()) {
$result = false;
$productQty = (int) $listingProduct->getMagentoProduct()->getQty(true);
$typeQty = (int) $ebaySynchronizationTemplate->getListWhenQtyMagentoHasValueType();
$minQty = (int) $ebaySynchronizationTemplate->getListWhenQtyMagentoHasValueMin();
$maxQty = (int) $ebaySynchronizationTemplate->getListWhenQtyMagentoHasValueMax();
$note = '';
if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_LESS) {
if ($productQty <= $minQty) {
$result = true;
} else {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Magento Quantity“ is set to less then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_MORE) {
if ($productQty >= $minQty) {
$result = true;
} else {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Magento Quantity” is set to more then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_BETWEEN) {
if ($productQty >= $minQty && $productQty <= $maxQty) {
$result = true;
} else {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Magento Quantity” is set between %template_min_qty% and %template_max_qty%', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if (!$result) {
if (!empty($note)) {
$additionalData['synch_template_list_rules_note'] = $note;
$listingProduct->setSettings('additional_data', $additionalData)->save();
}
return false;
}
}
if ($ebaySynchronizationTemplate->isListWhenQtyCalculatedHasValue()) {
$result = false;
$productQty = (int) $ebayListingProduct->getQty();
$typeQty = (int) $ebaySynchronizationTemplate->getListWhenQtyCalculatedHasValueType();
$minQty = (int) $ebaySynchronizationTemplate->getListWhenQtyCalculatedHasValueMin();
$maxQty = (int) $ebaySynchronizationTemplate->getListWhenQtyCalculatedHasValueMax();
$note = '';
if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_LESS) {
if ($productQty <= $minQty) {
$result = true;
} else {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Calculated Quantity” is set to less then %template_min_qty%', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_MORE) {
if ($productQty >= $minQty) {
$result = true;
} else {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Calculated Quantity” is set to more then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_BETWEEN) {
if ($productQty >= $minQty && $productQty <= $maxQty) {
$result = true;
} else {
$note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
Quantity of Magento Product is %product_qty% though in Synchronization Rules
“Calculated Quantity” is set between %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
}
}
if (!$result) {
if (!empty($note)) {
$additionalData['synch_template_list_rules_note'] = $note;
$listingProduct->setSettings('additional_data', $additionalData)->save();
}
return false;
}
}
if ($listingProduct->getSynchStatus() != Ess_M2ePro_Model_Listing_Product::SYNCH_STATUS_NEED && $this->isTriedToList($listingProduct) && $this->isChangeInitiatorOnlyInspector($listingProduct)) {
return false;
}
return true;
}