Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do i add a link to an existing php page


astoller

Recommended Posts

Depends where you want to put it..

 

In general it should look like this:

<a href="<?php echo tep_href_link('artist.php', ' ', 'NONSSL'); ?>">Artist</a>

 

If its a index /category page it would look like this:

<a href="<?php echo tep_href_link('index.php', 'cPath=12_32&', 'NONSSL'); ?>">Artist</a>

 

If its in your product description you'll need an add-on to pass the link through the HTML output. Addon 2905

Link to comment
Share on other sites

So here is the artist.php file.

Should just paste your code directly into this page?

 

<?php

define('NAVBAR_TITLE', 'Jim Daly');

define('HEADING_TITLE', 'Jim Daly');

define('TEXT_INFORMATION', '<p>

Soft spoken and modest, Jim Daly seems a reluctant celebrity, and it is his tender

and nostalgic portrayals of children that have earned him a wide and ardent following

among collectors.

</p>');

?>

Link to comment
Share on other sites

No,

 

What page do you want to put the Link on, and what page do you want to link to. Please be very specific.

 

What you just showed me was a language file, while you can put a link in there, you'll have to deal with the fact the page is in PHP. And I'm not certain you want the artist page with text linking to itself.

Link to comment
Share on other sites

Sorry been up for 20 hours, work, school etc..

 

You still haven't said where you want to put the link, only that you want it on the artist.php page.

 

So here is how you could put a link to the index page on the artist page.

 

<?php
define('NAVBAR_TITLE', 'Jim Daly');
define('HEADING_TITLE', 'Jim Daly');
define('TEXT_INFORMATION', '<p>
Soft spoken and modest, Jim Daly seems a reluctant celebrity, and it is his tender 
and nostalgic portrayals of children that have earned him a wide and ardent following 
among collectors. <a href="index.php" target="_self">Home Page</a>
</p>');
?> 

Link to comment
Share on other sites

Links to pages within the shop should always use the tep_href_link() function so you don't lose the session:

 

define('TEXT_INFORMATION', '<p> 
Soft spoken and modest, Jim Daly seems a reluctant celebrity, and it is his tender  
and nostalgic portrayals of children that have earned him a wide and ardent following  
among collectors. <a target="_self" href="' . tep_href_link(FILENAME_DEFAULT) . '">Home Page</a> 
</p>'); 

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...