[英]How to render content of .phtml in controller and observer in magento
我有一个观察员"checkout_cart_add_product_complete"
我想在位于cart.phtml
中的观察者和控制器中/template/ajaxminicart/checkout/cart.phtml
我怎样才能做到这一点?
检查以下内容,
<?php
$newBlock =Mage::app()->getLayout()
->createBlock('checkout/cart')
->setTemplate('ajaxminicart/checkout/cart.phtml')
-->toHtml();
echo $newBlock;
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.