Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default 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 line
    Code:
    define ('SPAN_SOMERSET_CHAIR','content goes here');
    to my includes/languages/english/custom/product_info.php and placed this line
    Code:
    <span><?php echo SPAN_SOMERSET_CHAIR; ?></span>
    in the product's description.

    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?
    Development Manager @ JSWeb Ltd
    Over 15 years with Zencart

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Pop-ups from Product Description

    Rick,

    are you using php tags inside of php tags,
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default 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:

    Code:
    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
    Development Manager @ JSWeb Ltd
    Over 15 years with Zencart

  4. #4
    Join Date
    May 2005
    Location
    Cheshire, UK
    Posts
    542
    Plugin Contributions
    3

    Default 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.

  5. #5
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,237
    Plugin Contributions
    20

    Default 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!)
    Development Manager @ JSWeb Ltd
    Over 15 years with Zencart

  6. #6
    Join Date
    May 2005
    Location
    Cheshire, UK
    Posts
    542
    Plugin Contributions
    3

    Default Re: Pop-ups from Product Description

    Using Firefox Version 1.05.03

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

 

 

Similar Threads

  1. Help me add size chart pop-ups to product listings please?
    By Jude Terror in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Nov 2009, 08:44 AM
  2. Replies: 2
    Last Post: 15 Feb 2009, 06:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR