Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Pop-ups from Product Description

Pop-ups from Product Description

Locked

Views: 2,939

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
11 May 2006, 8:58 AM
#1
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Pop-ups from Product Description

I stumbled across a handy method of creating popups using CSS and you can see it in action (using Firefox -and it should work in IE7) here (place the mouse over a link in the description).

Basically what happens is that all the stuff in the pop up is contained in a <span> tag but doing that makes the product description code extremely long. What I'm trying to do is to use php to define the contents of the <span> tag and then display it using an echo statement...but I can't get it to work (if you look back at the demo, you will see that chair B works correctly from the image link, but not from the text link which is where I'm trying the echo statement.

I have taken the content of the <span> and added this linedefine ('SPAN_SOMERSET_CHAIR','content goes here'); to my includes/languages/english/custom/product_info.php and placed this line ```
<span><?php echo SPAN_SOMERSET_CHAIR; ?></span>


I suspect I'm doing something very simple wrongly, or overlooking something blindingly obvious (but I have tried adding that define to both includes/languages/english/custom/index.php and includes/languages/custom/english.php without success).

Any ideas?:frusty:
11 May 2006, 9:48 AM
#2
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Pop-ups from Product Description

Rick,

are you using php tags inside of php tags,

11 May 2006, 9:55 AM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Pop-ups from Product Description

Not as far as I'm aware - I'm adding it to the product description in the usual manner through the product data entry page, with HTMLarea turned OFF.

This is the relevant section:

B. <a href="index.php?main_page=product_info&cPath=69_117&products_id=474">Somerset ¾ length wooden chairs<span><?php echo SPAN_SOMERSET_CHAIR; ?></span></a><br /> 

With the exception of the php extension in the other links, there's no other reference to php within the description

11 May 2006, 11:46 AM
#4
jollyjim avatar

jollyjim

Totally Zenned

Join Date:
May 2005
Location:
Cheshire, UK
Posts:
401
Plugin Contributions:
2

Re: Pop-ups from Product Description

That is very clever. But your closing </span> is showing up the tag at the end of the pop-up text. I am not sure if you can escape the / somehow but it would be worth a try.

11 May 2006, 11:51 AM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Pop-ups from Product Description

Using which browser JollyJim? I can't see that.

(BTW - you need to edit your sig as the new forum adds slashes to the old links!)

11 May 2006, 11:58 AM
#6
jollyjim avatar

jollyjim

Totally Zenned

Join Date:
May 2005
Location:
Cheshire, UK
Posts:
401
Plugin Contributions:
2

Re: Pop-ups from Product Description

Using Firefox Version 1.05.03

Thx for the tip about my sig - will go fix it now