本文整理汇总了PHP中Ess_M2ePro_Model_Listing_Other::isStopped方法的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Listing_Other::isStopped方法的具体用法?PHP Ess_M2ePro_Model_Listing_Other::isStopped怎么用?PHP Ess_M2ePro_Model_Listing_Other::isStopped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ess_M2ePro_Model_Listing_Other
的用法示例。
在下文中一共展示了Ess_M2ePro_Model_Listing_Other::isStopped方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isMeetRelistRequirements
/**
* @param Ess_M2ePro_Model_Listing_Other $listingOther
* @return bool
* @throws Ess_M2ePro_Model_Exception
* @throws Ess_M2ePro_Model_Exception_Logic
*/
public function isMeetRelistRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
{
if (!$listingOther->isStopped() || !$listingOther->isRelistable()) {
return false;
}
if (is_null($listingOther->getProductId())) {
return false;
}
/** @var Ess_M2ePro_Model_Ebay_Listing_Other $ebayListingOther */
$ebayListingOther = $listingOther->getChildObject();
$ebaySynchronizationTemplate = $ebayListingOther->getSynchronizationModel();
if (!$ebaySynchronizationTemplate->isMode()) {
return false;
}
if (!$ebaySynchronizationTemplate->isRelistMode()) {
return false;
}
if ($ebaySynchronizationTemplate->isRelistFilterUserLock() && $listingOther->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
return false;
}
if ($ebaySynchronizationTemplate->isRelistStatusEnabled() && !$listingOther->getMagentoProduct()->isStatusEnabled()) {
return false;
}
if ($ebaySynchronizationTemplate->isRelistIsInStock() && !$listingOther->getMagentoProduct()->isStockAvailability()) {
return false;
}
if ($ebaySynchronizationTemplate->isRelistWhenQtyHasValue()) {
$productQty = $ebayListingOther->getMappedQty();
if (!is_null($productQty)) {
$result = false;
$typeQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueType();
$minQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueMin();
$maxQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueMax();
if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_LESS && $productQty <= $minQty) {
$result = true;
}
if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_MORE && $productQty >= $minQty) {
$result = true;
}
if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
$result = true;
}
if (!$result) {
return false;
}
}
}
return true;
}