0

In the client dashboard>My Orders>View Order there is a print order option.

The file vendor\magento\module-sales\view\frontend\templates\order\items.phtml generates the output. But any changes I make to this file changes all pages using the file. Can I create a file so that only the print order url ( generated by <?php echo $block->getPrintUrl($_order) ?>) will use its own file?

Or can I create a new link to a new file so I can edit just the print order output?

0

in a template .phtml are hooked with blocks. If you need it for some specific page then the way suggested is 1. In layout handle add a new block. 2. Associate a .phtml 3. remove block.

with this in mind now copy existing .phtml and create a new .phtme with needed specific changes. So find out the handle for the URL you want changed layout and use above provided hints.

  • What is the handle for the URL? The url is <?php echo $block->getPrintUrl($_order) ?> – Jon Feb 1 '17 at 13:13

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.