Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Internal links


Guest

Recommended Posts

I want to create internal links in checkout_payment file, I've been trying to do it in the traditional way (html <a href="#link"></a> and <a name="link"></a>) but is not working, anybody has an idea or can tell me the right way to do it?............as always, thanks in advance for all the help(I know) I will recieve :D .

Link to comment
Share on other sites

The only thing I ran into is that depending on the way the session id is maintained (through cookie or through appending it to the URL) you need a different way of constructing the link.

 

To tackle that I used something like this:

 

if ( isset ($_GET['osCsid']) ) {
define('URL_FOR_ANCHOR', 'checkout_payment.php?osCsid='.$_GET['osCsid'].'');
} else {
define('URL_FOR_ANCHOR', 'checkout_payment.php?');
}

and then for the link:

<a href="<?php echo URL_FOR_ANCHOR ?>#link">Blah, blah</a>

I'm not 100% sure it will work like this, since I always have a variable in between like: checkout_payment.php?variable=something#link so perhaps in the "else" case you could just use checkout_payment.php#link ?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...