It is working fine.
<?php
$lastProductAddedToCartId = Mage::getSingleton('checkout/session')->getLastAddedProductId();
if($lastProductAddedToCartId) {
$productCategoryIdsArray = Mage::getModel('catalog/product')->load($lastProductAddedToCartId)->getCategoryIds();
$continueShoppingCategoryUrl = Mage::getModel('catalog/category')->load($productCategoryIdsArray[0])->getUrl();
}
?>
<button type="button" title="Continue Shopping" class="button" onclick="setLocation('<?php echo (isset($continueShoppingCategoryUrl)) ? $continueShoppingCategoryUrl : $this->getContinueShoppingUrl(); ?>')"><span><span>Continue Shopping</span></span></button>
<?php
$lastProductAddedToCartId = Mage::getSingleton('checkout/session')->getLastAddedProductId();
if($lastProductAddedToCartId) {
$productCategoryIdsArray = Mage::getModel('catalog/product')->load($lastProductAddedToCartId)->getCategoryIds();
$continueShoppingCategoryUrl = Mage::getModel('catalog/category')->load($productCategoryIdsArray[0])->getUrl();
}
?>
<button type="button" title="Continue Shopping" class="button" onclick="setLocation('<?php echo (isset($continueShoppingCategoryUrl)) ? $continueShoppingCategoryUrl : $this->getContinueShoppingUrl(); ?>')"><span><span>Continue Shopping</span></span></button>
Really nice blog about "continue shopping button", pretty well maintained blog. Thanks for this blog and keep updating.
ReplyDeletebuy Australian opal online
Its a very impressive post and pretty well maintained. This post has full of information. Thanks for the post and keep updating.
ReplyDeletemycophenolate tablet
Thanks for the update.
ReplyDeleteTreatment For Gas Problem Delhi