I want to be able to clear a custom column like this as soon as I login and I find that a particular SKU is in the cart.:

$quote -> setcolumn(''); 

How can I achieve this?

2 Answers 2


Try creating an observer for customer_login

In config.xml


In Observer.php

class YourCompany_YourModule_Model_Observer
    public function customerLogin($observer)
        //$customer = $observer->getCustomer();
       $updateCart = false
       $quote = Mage::getSingleton('checkout/session')->getQuote();
       $cartItems = $quote->getAllVisibleItems();
       foreach ($cartItems as $item) {
           if($sku == $item->getSku()){
              $updateCart = true;



See Magento - remove one quantity from cart


Try this.

$_NULL = new Zend_Db_Expr("NULL");
$quote -> setcolumn($_NULL);
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. Feb 12, 2015 at 4:29
  • What are you supposed to do with this answer? And who ever down voted, can I know the reason?
    – Sukeshini
    Feb 12, 2015 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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