Guest User

vvyvy

a guest
Mar 26th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2.  
  3. class Amasty_Example_Model_Observer
  4. {
  5. public function _deletedesign($observer)
  6. {
  7. $productId = $observer->getProduct()->getId();
  8. $customerId = Mage::getSingleton('customer/session')->getCustomer()->getId();
  9. $collection = Mage::getResourceModel('amasty/mydesign_collection')
  10. ->addFieldToFilter('product_id', 'product_id')
  11. ->addFieldToFilter('customer_id', 'customer_id');
  12. $collection->walk("delete");
  13. }
  14. }
  15. ?>
Add Comment
Please, Sign In to add comment