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

Remove “Ship To” coloumn and replace with ordered items
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

Hello I’m struggling with this small change just wondering if anybody point me in the right direction.

In the back end I’m looking to change the order page current it shows “Bill to Name” and “Ship to Name” i need the ship to name changing to show what the customer has ordered.

I know / have a understanding of how the function work.

app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php

I need to create a joinAttribute for the function I’m guessing and then add the following to call up the details

$this->addColumn('order_details', array(
            
'header' => Mage::helper('sales')->__('Order Details'),
            
'index' => 'order_details',
        ));
 
Magento Community Magento Community
Magento Community
Magento Community
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

I’ve been following this advice http://www.magentocommerce.com/boards/viewthread/7765/

But I’m confused with how its been achieved

 
Magento Community Magento Community
Magento Community
Magento Community
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

Please could somebody just explain the data collection ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

Can anybody suggest anything?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stuh
Jr. Member
 
Total Posts:  6
Joined:  2008-07-21
 

I have been looking for exactly the same solution.

Sounds like you are a little further ahead than me but it seems that no-one here knows how to implement it.

Maybe Moshe could help out with this, or maybe it is due for relase in a forthcoming version.

It seems there is a new version out almost every 2 weeks which is great but a little help in the forums would be fantastic

Stu

 
Magento Community Magento Community
Magento Community
Magento Community
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

Hello Stuh,

I’m getting very desperate now, surely somebody could point us in the right direction

 
Magento Community Magento Community
Magento Community
Magento Community
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

Ok so now im stuck i need to add a join attribute to this section to pull the order details

$collection Mage::getResourceModel('sales/order_collection')
            ->
addAttributeToSelect('*')
            ->
joinAttribute('billing_firstname''order_address/firstname''billing_address_id'null'left')
            ->
joinAttribute('billing_lastname''order_address/lastname''billing_address_id'null'left')
            ->
joinAttribute('shipping_firstname''order_address/firstname''shipping_address_id'null'left')
            ->
joinAttribute('shipping_lastname''order_address/lastname''shipping_address_id'null'left')

            ->
addExpressionAttributeToSelect('billing_name',
                
'CONCAT({{billing_firstname}}, " ", {{billing_lastname}})',
                array(
'billing_firstname''billing_lastname'))
            ->
addExpressionAttributeToSelect('shipping_name',
                
'CONCAT({{shipping_firstname}}, " ", {{shipping_lastname}})',
                array(
'shipping_firstname''shipping_lastname'));
        
$this->setCollection($collection);

Then add the something like this to show the data

$this->addColumn('billing_name', array(
            
'header' => Mage::helper('sales')->__('Bill to Name'),
            
'index' => 'billing_name',
        ));
 
Magento Community Magento Community
Magento Community
Magento Community
 
Stuh
Jr. Member
 
Total Posts:  6
Joined:  2008-07-21
 

I have tried editing many files and they either make no different at all or i end up crashing the cart

Any help would be welcome.

Stu

 
Magento Community Magento Community
Magento Community
Magento Community
 
mixwiz
Member
 
Total Posts:  39
Joined:  2008-07-21
 

Hello Stuart! Ive decided to give up on this now, as i think it may be impossible to create this.

Hope you find a solution, if you do let me know.

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