开发者

Magento - Make a copy of history.phtml and use it in my own way

开发者 https://www.devze.com 2023-03-19 18:22 出处:网络
I’m looking to find a way to copy the page history that we can access from My account/My orders which is available on this directory template/sales/order/history.phtml and use its content on my own w

I’m looking to find a way to copy the page history that we can access from My account/My orders which is available on this directory template/sales/order/history.phtml and use its content on my own way without affecting the original one. I’ve been trying many ways, as copying the whole directory and editing the Xml files related to it in order to setup up the right path and make it work, unfort开发者_如何学Pythonunately it was a failure. I would like to know if you could give me a solution for this. thx.


To use the functions of a block inside another .phtml I'm quite sure you can use getBlock

$blockFunctions = $this->getLayout()->getBlock('sales/order_history');
$order = $blockFunctions->getOrderHistory();

And to add a block in your custom module you'll need to create a .xml file for your block and add it to your template, you'll also have to add the actual .phtml file. Take a look at the moduleCreator (http://www.magentocommerce.com/magento-connect/danieln/extension/1108/modulecreator) this handles most of this quite well.

This is by no means througher its just a rough guide.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号