Is there any way to modify this tracking.phtml on magento admin? -


when choose 1 of option below, field 'title' automatically filled selected value carrier options.

i want same 'number' field, filled when choose custom carrier. there way modify tracking form? if yes, how? tracking form

thank's in advance

add following observer in module's config.xml

             <events>                 <adminhtml_block_html_before>                     <observers>                         <add_script_on_shipment>                             <class>yourmodule/observer</class>                             <method>addscript</method>                         </add_script_on_shipment>                     </observers>                 </adminhtml_block_html_before>             </events> 

put following code in observer.php

public function addscript($observer) {     $block = $observer->getevent()->getblock();     if (($block instanceof mage_adminhtml_block_sales_order_shipment_view_tracking) && $block->gettype() != 'core/template' /*&& carrier active*/) {         $shipment = $block->getshipment();         $_child = clone $block;         $_child->settype('core/template');         $block->setchild('calling_block', $_child);         $block->settemplate('yourmodule/custom_script.phtml');     } } 

add following code required modifications in custom_script.phtml

<?php echo $this->getchildhtml('calling_block');?> <script type="text/javascript">      /*your custom javascript code bind onchange event*/ </script> 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -