Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Session Id Problem with header


arcprophet

Recommended Posts

Hello everyone, I am new here but hope someone might be able to help me out. I created this header for our website(royalblueimports.com) in html however when someone clicks on a link from the header, the session id is lost and all cart contents are gone. Below is a copy of the html code:

 

<CENTER><TABLE cellSpacing=0 cellPadding=0 width=757 border=0>
<TBODY>
<TR>
<TD colSpan=3><A href="https://www.royalblueimports.com"><IMG height=120 alt="" 
src="/images/header_01.gif" width=329 border=0></A></TD>
<TD colSpan=5><IMG height=120 alt="" src="/images/header_02.gif" 
width=428></TD></TR>
<TR>
<TD><IMG height=33 alt="" src="/images/header_03.gif" width=144></TD>
<TD><A href="https://www.royalblueimports.com"><IMG height=33 alt="" 
src="/images/header_04.gif" width=102 border=0></A></TD>
<TD colSpan=2><A href="https://www.royalblueimports.com/allprods.php"><IMG 
height=33 alt="" src="/images/header_05.gif" width=105 border=0></A></TD>
<TD><A href="https://www.royalblueimports.com/specials.php"><IMG height=33 
alt="" src="/images/header_06.gif" width=102 border=0></A></TD>
<TD><A href="https://www.royalblueimports.com/affiliate_info.php?"><IMG 
height=33 alt="" src="/images/header_07.gif" width=102 border=0></A></TD>
<TD><A href="https://www.royalblueimports.com/infopages.php?info_id=4"><IMG 
height=33 alt="" src="/images/header_08.gif" width=101 border=0></A></TD>
<TD><A href="https://www.royalblueimports.com/contact_us.php"><IMG height=33 
alt="" src="/images/header_09.gif" width=101 border=0></A></TD></TR>
<TR>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=144></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=102></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=83></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=22></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=102></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=102></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" width=101></TD>
<TD><IMG height=1 alt="" src="/images/spacer.gif" 
width=101></TD></TR></TBODY></TABLE></CENTER>

 

I looked around the forums and found this:

 

<?php echo tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=415' ); ?>

 

but not really sure how I would make that work with my header. Any ideas?

 

ArcProphet

Link to comment
Share on other sites

You can't use hardcoded links and retain the session.

 

You have to use the tep_href_link function.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Hey there,

 

He's right some examples of fixing your code would look like this:

 

From:

 

<A href="https://www.royalblueimports.com/allprods.php">

 

To the stub function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true):

 

tep_href_link('allprods.php','','SSL');

 

( That makes sure that it gets the file from the HTTPS server that you set up in your includes/configure.php file )

 

You would also probably want to change your image tags as well from:

 

<IMG height=33 alt="" src="/images/header_05.gif" width=105 border=0>

 

Here's the function stub: tep_image($src, $alt = '', $width = '', $height = '', $parameters = ''):

 

EG. tep_image('header_05.gif','05','105','','border=0');

 

These functions are in HTML_OUTPUT.php and are required in the application_top.php file

 

That should get you going

 

Adam

While I'm operating on OSCommerce, I don't have to worry about silly vitals or forgetting to turn off the ane..the.. no wait I remember aes....thetic, or right I've got it Anaesthetic

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...