Follow by Email

Thursday, October 15, 2015

Update record with condition in custom module in magento

I have create a Model and for some development i had to implement Update method. It is very easy. I also try for conditional update. But i am using the following code which will fulfill your requirement for conditional update.

foreach($cart as $item_id=>$item){
        $olddata_id = Mage::getModel('custom/csaabandonedcart')->getCollection()
                ->addFieldToFilter('csa_id', Mage::getSingleton('customer/session')->getCustomerId())
                 ->addFieldToFilter('customer_id', $retailer)->addFieldToFilter('product_id', $item_id)
     $abandonedcart = Mage::getModel('custom/csaabandonedcart')->load($olddata_id[0]);


  1. Your post urges me to create a business website, of course I will free download magento as soon as possible. Magento is truly the best platform ever. Its extensions is also awesome. Thank you.

  2. Do you know what is Magento 2. This is the new era of Magento E-commerce

  3. This comment has been removed by the author.

  4. This comment has been removed by the author.

  5. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information.
    Bangalore Web Designing Company, UI Designing Company Bangalore

  6. The blog is absolutely truly incredible. Lots of large information and inspiration, both of which we all need.
    UI UX Design Companies in Bangalore, Web Application Development in Bangalore

  7. Nice to read this article... Thanks for sharing.....
    magento 2 training

  8. Magento is the best choice for making viable web based business website.Because Magento have more highlights and angles for make the site for internet business.
    Ecommerce Website Design and Development Company in Bangalore |outsource magento ecommerce services india