0

Is there a way when a product is duplicated so the 'Save After Event' is not fired or the product is not actually 'saved' until the product is 100% finished. As the product is actually getting 'created' even though it's not finished. I'm trying to prevent this.

Thanks!

1
  • I decided just put some logic into the duplication_event first that removed the fields in quest, therfor the 'Save After' event wouldn't process what I need as it happens before the 'Save After' during duplication of the product. Commented May 11, 2016 at 17:37

1 Answer 1

1

Although I am not a fan of rewriting major classes like Mage_Catalog_Model_Product, one way to skip the Save After event is to first do a <rewrite> of the Mage_Catalog_Model_Product class and then change $_eventPrefix property to anything other than catalog_product.

Something like this:

class My_Custom_Product_Class extends Mage_Catalog_Model_Product
{
   protected $_eventPrefix = 'custom_catalog_product';
}
1
  • Although this isn't the designed I used. The logic did work. Thanks. Commented May 13, 2016 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.