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

Customer State/Province from order…
 
alexbn
Sr. Member
 
Avatar
Total Posts:  167
Joined:  2009-04-22
Milano
 

Hi All,

I don’t know how to get the State/Province attribute value from customer address in order data:

$collection Mage::getResourceModel('sales/order_collection')
            ->
addAttributeToSelect('*')

            ->
joinAttribute('customer_postcode''order_address/postcode''customer_id'null'left'
            ->
joinAttribute('customer_street''order_address/street''customer_id'null'left'
            ->
joinAttribute('customer_city''order_address/city''customer_id'null'left'
            ->
joinAttribute('customer_region''order_address/region''customer_id'null'left'
            ->
joinAttribute('customer_country_id''order_address/country_id''customer_id'null'left')

I have tried with “state” and “province” but these attribute doesn’t exists.

Thanks
Alessandro

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