The <inp2:p_AddToCartLink template="__default__"/> tag is designed to build a link that, once visited will add that product to the Shopping Cart. Tag works flawlessly in places where it's used currently:
- the list of products
- product detail page
The problem however is with how this tag is written. Internally it relies on product ID being provided in Web Request and that makes it impossible to use in any other (except mentioned above) places.
- use ID of product from the object, rather than from Web Request
- specify "p_id" parameter via $link_params array (tag parameters) rather then setting it to the Web Request via "SetVar"