Question

how to call app\design\frontend\base\default\template\checkout\cart\crosssell.phtml to app\code\local\Cmsmart\AjaxCart\controllers\IndexController\ in popup window

    if(@$product) $json_encode['ajaxcontinue'] = '
    <div>
        <ul class="messages ajaxcart-messages">
            <li class="success-msg">
                <ul>
                    <li><span><a title="'.@$product->getName().'" href="'.@$product->getProductUrl().'">'.@$product->getName().' </a> '.$this->__('has been added to cart').'.</span></li>
                    <li><button onclick="setLocation(\''.Mage::getBaseUrl().'checkout/\')" class="button btn-continue" title="'.$this->__('Checkout').'" type="button"><span><span>'.$this->__('Checkout').'</span></span></button>

                </ul>
            </li>
        </ul>
    </div>';
Was it helpful?

Solution

Just Call below code in popup it will load same phtml for you

<?php echo $this->getLayout()->createBlock('checkout/cart_crosssell')->‌​setTemplate('checkou‌​t/cart/crosssell.pht‌​ml')->setProduct($pr‌​oduct)->toHtml();?>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top