Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Amasty_Example_Model_Observer
- {
- public function _deletedesign($observer)
- {
- $productId = $observer->getProduct()->getId();
- $customerId = Mage::getSingleton('customer/session')->getCustomer()->getId();
- $collection = Mage::getResourceModel('amasty/mydesign_collection')
- ->addFieldToFilter('product_id', 'product_id')
- ->addFieldToFilter('customer_id', 'customer_id');
- $collection->walk("delete");
- }
- }
- ?>
Add Comment
Please, Sign In to add comment