Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to create Hyperlink to same page frm product description


Recommended Posts

All I want to do is create sections in my product description.

 

<A href="#section1">Go to Section 1</A>

<A href="#section1">Go to Section 2</A>





<A name=section1>

...some html...



<A name=section2>

...some html...

 

I also noticed I cannot embed PHP in the Product Description

TextBox. In which case I could use something like

$SCRIPT_FILENAME. Any contributions that allow PHP to

be used from the product description text ?

 

Any suggestions on how to use internet hyperlinks ?

 

Thanks in advance,

-ibandyop[/code]

ibandyop

Link to comment
Share on other sites

You can embed HTML in the product descriptions.

Thank you., I am trying to avoid coding each section individually.

and want my webserver to tell me which page I'am on.

 

When I code:

<A href="#section1">Go to Section 1</A>

 

This expands to.

http://127.0.0.1/catalog/#section1

instead of

http://127.0.0.1catalog/product_info.php?p..._id=47#section1

 

This would mean that I have to manually modify and track each of my products_id=47 and since I have many sections, I want to know if

there is a way to do it.

 

On the otherhand if I could use PHP to parse the Product description I would simply have to write

 

<A href="<? echo $PHP_SELF ?>#section1">Go to Section 1</A>

 

Something like $PHP_SELF may be possible with HTML,

I just not able to find how to do it?

 

And I could use the same code+html for all my products and not

worry about the product_id and bad links.

 

Any suggestions on how to execute PHP on the products descriptions ?

 

Thanks,

-ibandyop

ibandyop

Link to comment
Share on other sites

Sorry, I misunderstood. This is the line of code that displays the product description.

</table><p><?php echo stripslashes($product_info['products_description']); ?></p>

If you are not able to embed PHP into the product descriptions, you could embed a special character that you can search for. Then you could split $product_info['products_description'] into several strings based on the search and rewrite the line to show one string, then some PHP, then the next string, etc.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...