/**
  * @param Ess_M2ePro_Model_Listing_Product $childListingProduct
  * @return bool
  */
 public function tryToRemoveChildListingProduct(Ess_M2ePro_Model_Listing_Product $childListingProduct)
 {
     if ($childListingProduct->isLocked()) {
         return false;
     }
     if ($childListingProduct->isStoppable()) {
         Mage::getModel('M2ePro/StopQueue')->add($childListingProduct);
     }
     $this->getTypeModel()->removeChildListingProduct($childListingProduct->getId());
     return true;
 }
Ejemplo n.º 2
0
 public function tryToDeleteChildListingProduct(Ess_M2ePro_Model_Listing_Product $childListingProduct)
 {
     if ($childListingProduct->isLocked()) {
         return false;
     }
     if ($childListingProduct->isStoppable()) {
         Mage::getModel('M2ePro/StopQueue')->add($childListingProduct);
     }
     $childListingProduct->deleteInstance();
     unset($this->childListingProducts[$childListingProduct->getId()]);
     return true;
 }