Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8917025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:23:32+00:00 2026-06-15T05:23:32+00:00

I want to add an attribute to order that will not be visible to

  • 0

I want to add an attribute to order that will not be visible to customer. I just want to use it in database and storing a specific value for each order. I want to print order according to this value. So how can i add an order attribute in magento. The attribute is just like status of order. Further on if i want to show that attribute in admin/sales/orders how can i do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:23:33+00:00Added an answer on June 15, 2026 at 5:23 am

    Assuming that you want to add my_custom_input_field to your order and add a field to your admin create order page (to add the field to the frontend you just need to add the input field to the front template and double check the observer)

    In /app/code/local/MageIgniter/CustomOrderStatus/etc/config.xml

    <?xml version="1.0"?>
    <config>
        <modules>
            <MageIgniter_CustomOrderStatus>
                <version>1.1</version>
            </MageIgniter_CustomOrderStatus>
        </modules>
    
        <global> 
             <fieldsets>
                <sales_convert_quote>                           
                    <my_custom_input_field><to_order>*</to_order></my_custom_input_field>
                </sales_convert_quote>
    
                <sales_convert_order>                                              
                    <my_custom_input_field><to_quote>*</to_quote></my_custom_input_field>
                </sales_convert_order>
            </fieldsets>
            <helpers>
                <customorderstatus>
                    <class>MageIgniter_CustomOrderStatus_Helper</class>
                </customorderstatus>            
            </helpers>
    
            <models>
                <customorderstatus>
                    <class>MageIgniter_CustomOrderStatus_Model</class>
                    <resourceModel>customorderstatus_mysql4</resourceModel>
                </customorderstatus>
            </models>
            <resources>
                <customorderstatus_setup>
                    <setup>
                        <module>MageIgniter_CustomOrderStatus</module>
                        <class>Mage_Sales_Model_Mysql4_Setup</class>
                    </setup>
                    <connection>
                        <use>core_setup</use>
                    </connection>
                </customorderstatus_setup>
                <customorderstatus_write>
                    <connection>
                        <use>core_write</use>
                    </connection>
                </customorderstatus_write>
                <customorderstatus_read>
                    <connection>
                        <use>core_read</use>
                    </connection>
                </customorderstatus_read>
            </resources>
    
            <events>
                <adminhtml_sales_order_create_process_data_before>
                    <observers>
                        <customorderstatus>
                            <type>singleton</type>
                            <class>customorderstatus/observer</class>
                            <method>saveCustomData</method>
                        </customorderstatus>
                    </observers>
                </adminhtml_sales_order_create_process_data_before>
            </events>
    
            <blocks>
                <customorderstatus>
                    <class>MageIgniter_CustomOrderStatus_Block</class>
                </customorderstatus>
            </blocks>
        </global>
    </config>
    

    In /app/code/local/MageIgniter/CustomOrderStatus/sql/customorderstatus_setup/mysql4-install-1.1.php

    <?php
    $installer = $this;
    $installer->startSetup();
    
    $installer->addAttribute("order", "my_custom_input_field", array("type"=>"varchar"));
    $installer->addAttribute("quote", "my_custom_input_field", array("type"=>"varchar"));
    $installer->endSetup();
    

    In /app/code/local/MageIgniter/CustomOrderStatus/Model/Observer.php

    class MageIgniter_CustomOrderStatus_Model_Observer 
    {
        public function saveCustomData($event)
        {
            $quote = $event->getSession()->getQuote();
            $quote->setData('my_custom_input_field', $event->getRequestModel()->getPost('my_custom_input_field'));
    
            return $this;
        }
    }
    

    (You should avoid make changes to core default – you should do some research on way around this)

    In /app/design/adminhtml/default/default/template/sales/order/view/info.phtml

    <?php if($_order->getMyCustomInputField()): ?>
    <tr>
        <td class="label"><label><?php echo Mage::helper('sales')->__('My Custom Input Field') ?></label></td>
        <td class="value"><strong><?php echo $_order->getMyCustomInputField() ?></strong></td>
    </tr>
    <?php endif; ?>
    

    In /app/design/adminhtml/default/default/template/sales/order/create/form/account.phtml

    (to add to frontend change the value="<?php echo Mage...>")

    <input id="my_custom_input_field" name="my_custom_input_field" value="<?php echo Mage::getSingleton('adminhtml/session_quote')->getQuote()->getMyCustomInputField() ?>" class="input-text" type="text">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a simple slideUp animation on an object. I want to add attribute
I want to add custom attribute settings to a generated anchor link of Wordpress.
In my E-commerce application, I want to add a attribute to a Product, only
I want to add a rel attribute of the element matching the array, so
I new in database design, I want to be sure that i make it
I have this in order to replace attribute disabled with readonly and I want
As I understand it you should use the Order property of the DataMember attribute
I want to add toggle attribute to mysite. When I click hide/show button, it
I want to add the data-val-required and data-val attributes to an @html.textbox or an
I want to add class atttributes to a superclass dynamically. Furthermore, I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.