Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

URL in Product Description


Recommended Posts

I am using OSC 2.2 and would like to use the Product Description to link to other products in the catalog, for example, a similar product the customer might be interested in.

My problem is if I put a standard HTML link in the description I loose the customer's stored Session ID and therefore any products previously added to the shopping cart disappear.


I've tried various attempts at using the tep_href_link() function but with no luck.



random text here as usual in the prod_desc than I get to the link I want and try <a href="<?php echo tep_href_link('/product_info.php', 'cPath=25&pID=26'); ?>">Link Here</a>


Any suggestions would be greatly appreciated.


Link to comment
Share on other sites

Hi martin


I've used this facility quite a lot in product descriptions.


You need to tep you href in like :


<a href=' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=29") . ' class=product_info target=_blank>Bumpy night wrap</a>

Best of luck



Link to comment
Share on other sites

Just want to say thanks for posting replies!


I looked at the Cross Sell contribution and I think it's just what I need, although I haven't installed it yet.


I'll post my results.


do you have the "use search engine safe" feature turned on?

if so, try to turn it off before anything else. to the best of my understanding, tep_href_link carries with it the session id, but the "search engine safe" feature gets in the way.


geed luck,


Link to comment
Share on other sites

I suspect the problem is the one I have - you would like to add the link to the other product in the product description, which is in the database. This text is not interpreted as PHP. A cross-sell contribution would seem the way to go.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...