Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Adding Anchor Links (jump from top to bottom of page) to Product Pages Template

Adding Anchor Links (jump from top to bottom of page) to Product Pages Template

14 Feb 2010, 4:52 AM
#1
buyashed avatar

buyashed

New Zenner

Join Date:
May 2007
Posts:
36
Plugin Contributions:
0

Post #1 by buyashed

Hi there,

I'm trying to add some links in to our product info template... (tpl_product_info_display.php) that will allow the customer to jump straight down to the bottom of the page.

This is normally simple but doesn't seem to work in zencart unless you use the full product url, which obviously won't work for the template.

Doesn't anybody know how to fix this or another way of doing it?

Thanks, ToNy!

14 Feb 2010, 6:40 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

Post what and where in the file you are adding for this

Zen-Venom Get Bitten

14 Feb 2010, 4:53 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,156
Plugin Contributions:
56

Post #3 by lat9

The variable $_SERVER['REDIRECT_QUERY_STRING'] contains everything after the https://www.yourstore.com/index.php? ... so you could build the anchor references as

<a href="index.php?<?php echo $_SERVER['REDIRECT_QUERY_STRING']; ?>#anchor">some text</a>
22 May 2010, 10:41 PM
#4
sheryll avatar

sheryll

New Zenner

Join Date:
Dec 2009
Location:
New York, NY
Posts:
45
Plugin Contributions:
0

Post #4 by sheryll

The code isn't working. It still redirects back to the homepage.