如何在控制器中呈现 .phtml 的内容,并在洋红色中呈现观察器的内容



>我有一个观察者"checkout_cart_add_product_complete"

我想在位于/template/ajaxminicart/checkout/cart.phtml的观察者和控制器中渲染cart.phtml的内容

我该怎么做?

检查以下内容,

<?php
$newBlock =Mage::app()->getLayout()
->createBlock('checkout/cart')
->setTemplate('ajaxminicart/checkout/cart.phtml')
-->toHtml();
echo $newBlock;
?>

最新更新