I'm trying to customize the html print order (url http://www.yoursite.com/index.php/sales/order/print/order_id/8/ ) but I can't find the right file to do this.
I'm working on template/sales/order/print files but all the changes I made aren't visible.
could you please give me a hint?
Thanks a lot
Best regards
EDIT: ok, I've found the file that I need to modify, it is print-phtml in app/design/frontend/default/MYTEMPLATE/template/sales/order
Now I'd like to add product description in each row in this html print page, but I don't know how I can do this
There is
<?php $_items = $_order->getItemsCollection(); ?>
<?php $_count = $_items->count(); ?>
<?php foreach ($_items as $_item): ?>
<?php if ($_item->getParentItem()) continue; ?>
<tbody>
<?php echo $this->getItemHtml($_item) ?>
</tbody>
<?php endforeach; ?>
so I think that I have to modify something in $this->getItemHtml($_item) but I have no idea where is this getItemHtml
could you please help me? thanks a lot
The file you have to edit is the \sales\order\items\renderer\default.phtml , but changes you make here will also appear on the order view page. To avoid this, you can use the following condition in this phtml (there is also an example in the original version):
<?php if ($this->getPrintStatus()): ?>
....
<?php endif;?>
.. and for similar issues in the future: on the admin panel, in System/Configuration menu if you switch to "Store view", you will find an option under Advanced/Developer tab called "Template path hints". If you set it to "yes", you will see the template pathes in the frontend, embedded inline next to each block. How to use template path hints
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With