2

I want to add additional data after order item name in order view page.

I have added below code in config.xml file but it is replace then name. I want to append content not replace.

<adminhtml_sales_order_view>
    <reference name="order_items">
        <action method="addColumnRender">
            <column>name</column>
            <block>adminhtml/sales_items_column_name</block>
            <template>productcustomizer/sales/order/view/additional.phtml</template>
        </action> 
    </reference>
</adminhtml_sales_order_view>

It is displaying like below

enter image description here

I want to like below

enter image description here

I have tried below code in config.xml but it is not working.

<adminhtml_sales_order_view>
    <reference name="order_items">
        <block after="content" type="adminhtml/sales_items_column_name" name="additional.product.info" template="productcustomizer/sales/order/view/additional.phtml" />
    </reference>
</adminhtml_sales_order_view>

1 Answer 1

1

call your phtml file in app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

below

<?php echo $this->getColumnHtml($_item, 'name') ?>
8
  • I am developing extension so I can't call like this. if you have any other way Please let me know Commented Jan 4, 2017 at 13:18
  • @ChetanKhandla as you are overriding name column so you have to call adminhtml/default/default/template/sales/items/column/name.phtml in to your template. Commented Jan 4, 2017 at 14:09
  • How can I prevent overriding? You have any idea Commented Jan 5, 2017 at 5:10
  • Can I call multiple template? Commented Jan 5, 2017 at 5:15
  • @ChetanKhandla I dont think there is another way. You can achieve this with the help of javascript without affecting core template file. Where as in your template first jcall core template and then add your content Commented Jan 5, 2017 at 9:07

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.