I'm following this guide (product attribute to quote item and order item) however for whatever reason I seem unable to retrieve my attribute in my observer. My attribute I created is called "budgetcode" and is assigned to the product I'm trying to purchase. In my observer I'm attempting to use the same theory as the above post however my "budgetcode" attribute appears so deep within the schema I cannot retrieve it. I did Zend_Debug::dump($item) and can see a massive output (too big to paste) with my budgetcode shown way down, problem is I can't seem to retrieve it.


class Bendart_BudgetCode_Model_Observer extends Varien_Event_Observer
    public function setBudgetCodeAttribute(Varien_Event_Observer $observer)
        $item = $observer->getQuoteItem();
        $product = $observer->getProduct();
        return $this;


<?xml version="1.0"?>

                        <budgetcode />


Any help is appreciated.

  • Note: if you cant paste the entire output of the debug, post something form the debug. The few lines surrounding the 'budgetcode' entry would be helpful here.
    – SH-
    Commented Sep 24, 2013 at 17:19

1 Answer 1


CamelCase is important in the magic getters/setters

You mention your attribute is called 'budgetcode' but you are using getBudgetCode() - which will translate to an attribute called budget_code.

If you attribute is called budgetcode then you need to use getBudgetcode()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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