Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tep href link


knifeman

Recommended Posts

I sure hope somebody can tell me what I am doing wrong. I have a link on my index page that works. It is

<a href="<?php echo tep_href_link("rada-cutlery-c-21.html", '', 'NONSSL'); ?>"><U>Rada cutlery</U></a>

I have created a new page and I am trying to paste the same link in the text. When i do, I get this error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /includes/languages/english/rada_knives.php on line 17

I changed the code to this:

<a href="<?php echo tep_href_link("rada-cutlery-c-21.html"); ?>"><U>Rada cutlery</U></a>

The page loads fine, but the link points to oblivion:

http://mydomain/<?php%20echo%20tep_href_link(

I will admit I am not real good at the php yet, but the link works just fine on index.php but not on the new page I created. Any hints will be appreciated,

 

Tim

 

AHA! I got it working. I placed the link in the root category file rather than the file in includes / languages / english / Now it works. The problem is, I can only place it at the beginning of the text information. What if I want several links in my text? How do I compose a link that will work in the includes / languages / english / file?

Link to comment
Share on other sites

The following should work fine from your english/ fiels

<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '"> Some Text</a>

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for helping out Jack. I tried this code here:

<a href="' . tep_href_link(rada-cutlery-c-21.html, '', 'NONSSL') . '">Rada Cutlery</a>

but I still get the error:

Parse error: parse error, unexpected T_STRING in /includes/languages/english/rada_knives.php on line 18

 

The page works fine until I try to add a link. I am still not sure what i am doing wrong. I have ultimate seo url installed. That is why the link is an html page. Does that matter? I don't see why it would, but I am out of ideas. If I had the time, I would take a php course.

Link to comment
Share on other sites

try

<a href="' . tep_href_link('rada-cutlery-c-21.html', '', 'NONSSL') . '">Rada Cutlery</a>

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Thanks for helping out Jack. I tried this code here:

<a href="' . tep_href_link(rada-cutlery-c-21.html, '', 'NONSSL') . '">Rada Cutlery</a>

but I still get the error:

Parse error: parse error, unexpected T_STRING in /includes/languages/english/rada_knives.php on line 18

 

The page works fine until I try to add a link. I am still not sure what i am doing wrong. I have ultimate seo url installed. That is why the link is an html page. Does that matter? I don't see why it would, but I am out of ideas. If I had the time, I would take a php course.

The example I showed uses a pre-defined name, FILENAME_DEFAULT. When you use on of those, you just use it as shown. But if you use an actual link, as in your case, you have to enclose it with single quotes, as shown by Steve. I'm sorry I confused you. It will get easier as you go though.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...