Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add a link with session id to languages/english/index.php?


brazillia

Recommended Posts

Hi all,

 

I've been looking on the forum for the better part of the morning and havn't found anything that seems to help me here.

 

What I am trying to do is add a link to an item or category through an image and/or text in the catalog/index.php page by changing the "Text Main" content in languages/english/index.php. I have tried the following two methods:

 

1. somewhat hard-coding it so that the link is

<a href="product_info.php?cPath=61&products_id=264&osCsid=<? echo tep_session_id() ?>">click here</a>

2. adding the link via tep_href_link

 

The first method parses just as it is written and does not add the session id, and the second method gives me something like a T-string error (can't remember the exact message).

 

I'm not very proficient at coding (obviously) so if anyone can help me I would very much appreciate it.

Link to comment
Share on other sites

If you are trying to include a link in one of the defines you need to be careful with your single & double quotes

 

something like this should help you out:

define('TEXT_MAIN', 'This is my main page text.  <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=61&products_id=264') . '">Here is a link to a product</a>');

 

Tom

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...