1

When we choose one of the option below, the field 'title' automatically filled with selected value from carrier options.

I want to do the same for 'number' field, it would be filled with something when I choose my custom carrier. Is there any way to modify this tracking form? If yes, how? tracking form

Thank's in advance

1

Look in the file app/design/adminhtml/default/default/layout/sales.xml, tracking.phtml is used several times. If this change is for a module then create a layout file 'yourmodule.xml' and enable it from your config file. Otherwise name it 'local.xml'. It's contents will have to be an update something like this:

<?xml version="1.0"?>
<layout>
    <adminhtml_sales_order_shipment_new>
        <reference name="shipment_tracking">
            <action method="setTemplate">
                <template>your/new/tracking.phtml</template>
            </action>
        </reference>
    </adminhtml_sales_order_shipment_new>
</layout>

Also if you want to minimize number of copypasted layout statements you can use <update handle="handle_name" /> inside different controller action handles. For example:

<my_handle_name>
    <reference name="shipment_tracking"> 
        <action method="setTemplate"> 
            <template>your/new/tracking.phtml</template>
        </action> 
    </reference> 
</my_handle_name> 
<adminhtml_sales_order_shipment_new>
    <update handle="my_handle_name"/>
</adminhtml_sales_order_shipment_new> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.