Magento Forum

How to add new attribute to sales orders
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

I want to add cost and location to my sales orders, I’ve worked out I need to edit
app/design/adminhtml/default/default/template/sales/order/view/items.phtml
app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

But I don’t know what code to add or where in the default.phtml to add it, any help would be appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

You might be interested in a Order Memos and Attachments extension, it allows to add new attributes to the existing orders for specific admin needs.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

Thanks I might find a use for that one day but it’s not what I asked for and I’m also not looking at buying another addon

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Can you post a screen with what you you are trying to achieve?  May be we can find a solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

Hope this makes sense

Image Attachments
Untitled-1.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

This table shows data from the sales_flat_order_item, so you can only add fields fields that are in the database.
There is `base_cost` field, probably it is what you are looking for.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

How? I don’t really know what you mean about that

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Try to add <?php echo $_item->getBseCost() ?> in some place of the template.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

I tried changing this

<?php echo $this->displayPriceAttribute('tax_amount'?>

to

<?php echo $_item->getBseCost() ?>

But it didn’t show anything

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

Sorry it\’s working, I noticed you put bse, thanks for that, can I not add custom attributes?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

Now that’s working, do you know how I would use subtotal?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

I’m getting there, I think I need to include base_total_invoiced_cost but I can’t call it

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beermonster
Member
 
Total Posts:  68
Joined:  2010-09-03
 

I would really appreciate help on calling base_total_invoiced_cost in to my template

TIA

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