Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

[MOSHE] I am Not getting Value From Database on Admin
 
subesh
Sr. Member
 
Avatar
Total Posts:  145
Joined:  2009-01-08
 

1. I have added new field in onepage checkout. (States)

2. Three attribute_code=’states’ on eav_atttibute for order_address,customer_address and quote_address

3. New column on sales_quote_flat_address (states)

Updated the sales_quote_flat_address… its working i.e states value is inserted but when I query $_order->getBillingAddress()->getStates().. I AM NOT GETTING THE VALUE..

what is wrong here.. plz help me (MOSHE)

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

hi,

take a look at the models sales/model/convert/order.php and sales/model/convert/quote.php, you have to overwrite the address methods and add your own attribute.

cheers

s.

 
Magento Community Magento Community
Magento Community
Magento Community
 
subesh
Sr. Member
 
Avatar
Total Posts:  145
Joined:  2009-01-08
 

I have added these in my config.xml file.. but still i am not getting it.. ( I wrote these all on Module/etc/config and Module/Sales/etc/config.) but still its not working… :(

<global>
       <
fieldsets>
             <
sales_copy_order_billing_address>
                        <
states><to_order>*</to_order></states>
                    </
sales_copy_order_billing_address>
                    <
sales_copy_order_shipping_address>
                        
                        <
states><to_order>*</to_order></states>
                        
                    </
sales_copy_order_shipping_address>
                    
                <
sales_convert_quote_address>
             
                <
states><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></states>
                
            </
sales_convert_quote_address>
            
        
                 <
sales_convert_order_address>
              
                <
states><to_quote_address>*</to_quote_address></states>
              
            </
sales_convert_order_address>
            
        <
customer_address>
                
                <
states><to_quote_address>*</to_quote_address></states>
                
                
            </
customer_address>
    </
fieldsets>
        </global>
 
Magento Community Magento Community
Magento Community
Magento Community
 
subesh
Sr. Member
 
Avatar
Total Posts:  145
Joined:  2009-01-08
 

It Worked.. after adding to Module/Sales/config.xml......

It didn’t work yesterday.. may be cache problem or something else..was missing…

but guys it worked :D:D:D::D:D::D:D::D::D

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Magento’s cache flow is a bit mysterious from time to time. For any others reading this post remember to always clear your cache when adding something new (especially if you are modifying any xml files which holds the configuration). I don’t know how many times I’ve been banging my head in the table because I forgot to clear that cache LOL.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

hi,

iam happy that iam not your head smile!

cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

subesh, i’m trying to do something similar.  your paths are a little confusing. could you write out the full paths for the files you had to edit?

thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
quanza
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2008-12-02
Tokyo, Japan
 

never mind, i figured it out.  i just needed to run through the purchase cycle again as it seems the _flat_ tables are - as they imply - flat, so even if the data is in the db, it won’t render unless the fieldsets were correct before the order was made.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top