Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Added link in header to a php page


kingkahn22

Recommended Posts

you must use the tep_href_link function to create links - this will preserve the session. Below is an example including the continue button:

 

                        <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

 

If you don't, customers will click on your link and lose the session - then their shopping cart will be empty :-"

 

Matti

Link to comment
Share on other sites

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT) . '">Your Text</a>'; ?></td>

 

FILENAME_CREATE_ACCOUNT is defined in /includes/filenames.php you could instead have 'yourfile.php' (enclosed with quotes)

 

If you have created a new file, make sure that at the top you have:

 

 ?require('includes/application_top.php');

 

The above is needed in new files so that the sessions class will be called.

 

Matti

Link to comment
Share on other sites

Thank you for your help Matti, I appreicate it.

 

A quick question, it all seems to work well and I see A sesion ID in the link the first time I click on my new top nav links. How ever the second time I click on a new link, or a product, or any page the Sesion ID is not in the link. Is this ment to be ??

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...