How to get the category id pass into a custom href

Hi All

I’m doing a small customization which I need to get the category id passed into below <a tag. in the product add to cart popup. below is my code which I have added to the product_notification.tpl. The category_id captured through request doesn’t get passed.

Continue shopping

I have added this code into categories.php controller

if ($mode == ‘view’)




But when I check the url the category id doesn’t get passed. can any one help me on this