2

How to Custom Comment History In Page Sales Order And programmatically Comment History In Admin Order ?

enter image description here

I've added Config.xml,

<layout version="0.1.0">

<adminhtml_sales_order_view>
    <reference name="head">
        <action method="addItem"><type>skin_css</type><name>ig/css/main.css</name></action>
    </reference>
    <reference name="order_tab_info">
        <action method="setTemplate"><template>ig/sales/order/view/tab/info.phtml</template></action>
        <block type="adminhtml/ig_sales_order_view_history" name="ig_order_history" template="ig/sales/order/view/history.phtml"></block>
    </reference>
</adminhtml_sales_order_view>

How to add Block history.phtml?

And how the flow controller Post in my module?

2
  • you want to rewrite the comment history block? Oct 4, 2016 at 5:01
  • @qaisar-satti Yes, I would like to rewrite and there are additional selection of templates you want to use
    – Tobias dsn
    Oct 4, 2016 at 5:24

1 Answer 1

0

you can set your history template

<adminhtml_sales_order_view>
      <reference name="order_history">
         <action method="setTemplate"><template>ig/sales/order/view/history.phtml</template></action>
      </reference>
</adminhtml_sales_order_view>

override controller

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Namespace_Modeulename before="Mage_Adminhtml">
                        Namespace_Modeulename_Adminhtml
                    </Namespace_Modeulename>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

app/code/local/Namespace/Modeulename/controllers/Adminhtml/Sales/OrderController.php

<?php

 require_once "Mage/Adminhtml/controllers/Sales/OrderController.php";

 class Namespace/Modeulename/controllers/Adminhtml/Sales/OrderController extends Mage_Adminhtml_Sales_OrderController {

  public function addCommentAction()
   {
     die("H");
    }
}
12
  • how the controller of this module comment ?
    – Tobias dsn
    Oct 4, 2016 at 5:43
  • updated the code but not tested.. Oct 4, 2016 at 5:52
  • Where event email template Comment?
    – Tobias dsn
    Oct 4, 2016 at 6:10
  • this code do that $order->sendOrderUpdateEmail($notify, $comment); Oct 4, 2016 at 6:12
  • What if I want to move the sales invoice history, to the sales order history ?
    – Tobias dsn
    Oct 4, 2016 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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