I would like to get the URL of the product which was recently added to cart (lastly added to the cart) and assign it to Continue Shopping url in cart page.
In Magento, there have a checkout session variable which is store lastly added to the cart item products id.
and using this product id with help
product model,you can get url easily.
$product_collection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToFilter('entity_id', Mage::getSingleton('checkout/session')>getLastAddedProductId()) ->addUrlRewrite(); $product_collection_url = $product_collection->getFirstItem()->getProductUrl()
Here i have product/collection model getting data firster