cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 Custom Quote/Order Attribute on Cart Page

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Magento 1.9 Custom Quote/Order Attribute on Cart Page

I am using an SDK to get a custom gift card image and attach it to an order on the cart page. I have the attribute in sales_flat_quote. I am sending the URL from the SDK to a function that adds it to the quote. The problem I am facing is getting the correct quote to add the attribute to. 

Here is the code to save the attribute:

 

$item = Mage::getSingleton('checkout/session')->getQuote()
$result = $_POST['results'];
$item->setGiftCardImage($result)->save(); 
Mage::getSingleton('checkout/cart')->save();


This is creating a new quote and adding the attribute to it instead of the current quote. So my question is how do I specify the correct quote and not just create a new one? Is it possible to getQuote using entity_id?