When duplicating a a product by calling $_product->duplicate() the group price does not get duplicated, how can I resolve this issue?
1 Answer
The duplicateAction()
is in Mage_Adminhtml_Catalog_ProductController
which calls the duplicate()
method of Mage_Catalog_Model_Product
.
In the duplicate()
method, the data is set on the new product.
There's an event which you can use to hook in, retrieve the group price of the current product and set it to the new product:
Mage::dispatchEvent(
'catalog_model_product_duplicate',
array('current_product' => $this, 'new_product' => $newProduct)
);