title: Magento :Update cart item Custom Option using ajax
body: <p>I need to update the custom option value using ajax.
  I am trying to update it like </p>
  
  <pre><code>$params = $this-&gt;getRequest()-&gt;getParams();
      $itemID = $params['item'];
      $item =         Mage::getSingleton('checkout/session')-&gt;getQuote()-&gt;getItemById($itemID);
      $options = $item-&gt;getOptions();
  
      foreach ($options as $option) {
  
          if(strtolower($option-&gt;getCode()) == 'info_buyRequest')
          {
              $unserialized = unserialize($option-&gt;getValue());
              $unserialized['options'][216]= 'New Value';
              $option-&gt;setValue(serialize($unserialized));
  
          }
      }
      $item-&gt;save();
  </code></pre>
  
  <p>Can any one help me abt what is going wrong here.
  Thanks</p>