Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 58
  1. #11
    Join Date
    Mar 2005
    Location
    Tulsa, Ok
    Posts
    174
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    Hey haredo,
    Just thought I'd see how the mod-finding went! Were you able to find your notes?
    "You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

  2. #12
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    Are you ready for some Football.

    Step 1
    includes/ extra_datafiles/
    1. create a php. file called:
    2. popup_monogram_style.php
    3. Now inside this file copy and paste:
    4. HTML Code:
      <?php
      // About Us Filename Define
       define('FILENAME_POPUP_MONOGRAM_STYLE', 'popup_monogram_style');
      ?>
    Step 2
    includes/ languages/ english/ your_own_template/
    1. create a .php file called
    2. popup_monogram_style.php
    3. Now inside this file copy and paste:
    4. HTML Code:
      <?php
      //
      // +----------------------------------------------------------------------+
      // |zen-cart Open Source E-commerce                                       |
      // +----------------------------------------------------------------------+
      // | Copyright (c) 2003 The zen-cart developers                           |
      // |                                                                      |
      // | http://www.zen-cart.com/index.php                                    |
      // |                                                                      |
      // | Portions Copyright (c) 2003 osCommerce                               |
      // +----------------------------------------------------------------------+
      // | This source file is subject to version 2.0 of the GPL license,       |
      // | that is bundled with this package in the file LICENSE, and is        |
      // | available through the world-wide-web at the following url:           |
      // | http://www.zen-cart.com/license/2_0.txt.                             |
      // | If you did not receive a copy of the zen-cart license and are unable |
      // | to obtain it through the world-wide-web, please send a note to       |
      // | [email protected] so we can mail you a copy immediately.          |
      // +----------------------------------------------------------------------+
      // $Id: popup_monogram_style.php 1969 2005-09-13 06:57:21Z drbyte $
      //
      
      define('HEADING_MONOGRAM_STYLE', 'MONOGRAM STYLES');
      define('TEXT_MONOGRAM_STYLE1', '<strong>Please Take The Time To Accurately Determine Bracelet Size:</strong><br /> All our bracelets are measured from end to end including the clasp.<br /> If you follow our guidelines you will receive a nice fitting bracelet with a little bit of movement and room.<br /><br />
      <strong>Measuring Your Wrist:</strong><br />
      To determine the bracelet size you need, measure wrist with a soft flexible measuring tape and add 1/2" depending on the desired dangle length.<br /> If you do not have a measuring tape you can use a ribbon or piece of string.<br /> Mark the length then measure with a ruler.<br /><br />
      <strong>Please Note:</strong><br /> Depending on the beads used in making your bracelet - your bracelet may vary from the size you specified by up to approximately 1/8".<br /> We make all bracelets "as close as possible" to the size you order.');
      
      define('TEXT_MONOGRAM_STYLE2', '<br />');
      
      define('TEXT_CLOSE_MONOGRAM_STYLE_WINDOW', 'Close Window [x]');
      ?>
    5. This will be the file you will edit for a customer to view the popup
    Step 3
    includes/ templates/ your_custom_template/
    1. create a new folder called:
    2. popup_monogram_style
    3. Inside this folder, create a .php file called:
    4. tpl_main_page.php
    5. now inside this file paste and copy
    6. HTML Code:
      <?php
      /**
       * tpl_main_page.php
       *
       * @package templateSystem
       * @copyright Copyright 2003-2005 Zen Cart Development Team
       * @copyright Portions Copyright 2003 osCommerce
       * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
       * @version $Id: tpl_main_page.php 2870 2006-01-21 21:36:02Z birdbrain $
       */
      ?>
      <body id="popupMONOGRAM_STYLE">
      <h1><?php echo HEADING_MONOGRAM_STYLE ?></h1>
        <div id="braceletSize"><?php echo TEXT_MONOGRAM_STYLE1 ?></div>
        <div><?php echo TEXT_MONOGRAM_STYLE2 ?></div>
        <div><?php echo '<a href="javascript:window.close()">' . TEXT_CLOSE_MONOGRAM_STYLE_WINDOW . '</a>'; ?></div>
      </body>
    Step 4
    includes/ templates/ your_custom_template/ templates/ tpl_modules_attributes.php
    1. You are going to edit this puppy.
    2. Find this:
    3. HTML Code:
      <h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
      <?php
        }
    4. Right blow this Add the following:
    5. if (preg_match("/monogram style/i", $options_name[$i]))
      {
      $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_MONOGRAM_STYLE) . '\')">(<u>Guidelines</u>)</a>';
      }
      else if (preg_match("/engraving typestyle/i", $options_name[$i]))
      {
      $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ ENGRAVING_TYPESTYLE) . '\')">(<u>Guidelines</u>)</a>';

      }
      else if (preg_match("/embroidery typestyle/i", $options_name[$i]))
      {
      $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ EMBROIDERY_TYPESTYLE) . '\')">(<u>Guidelines</u>)</a>';

      }
      else
      $guideLink = null;
      ?>
    6. The lime green font above will change to your subcategory name.
    7. I did not have a url to your web site to view so I just put up wording
    8. That freekin smile face, must be the code to enter needs to be changed:
    9. delete the with : p No space between the colon & p Of all times it happens
    10. The red font above is the Wording you need to change beside the Option Name to whatever you like. The link to view the popup when clicked on..
    11. I edited all the proper files for the first preg_match to work
    12. Your will half to clone the rest for all of the popups you want
    13. Notice I used 3 preg_match above
    14. You will half to add on if you want more, As it looks by the option names you send back to me..
    Mark
    Hare Do

  3. #13
    Join Date
    Mar 2005
    Location
    Tulsa, Ok
    Posts
    174
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    Hoooooly Lordy, ok... Let me see if I got this right...

    Step 1 and two will need to be repeated for each different popup I need (I listed a lot before, but after looking at this I will try to combine several of them, lol!) So for example, if I need the "monogram style" and "embroidery style" (and more for however many I actually need), I would do the following:

    Step 1: make the files:
    includes/extra_datafiles/popup_monogram_style.php and
    includes/extra_datafiles/popup_embroidery_style.php
    etc.
    and paste the provided code.

    Step 2: make the files:
    includes/languages/english/your_own_template/popup_monogram_style.php and
    includes/languages/english/your_own_template/popup_embroidery_style.php
    etc.
    and paste the provided code; editing to my own needs.

    Step 3: make the files:
    includes/templates/your_custom_template/popup_monogram_style/tpl_main_page.php and
    includes/templates/your_custom_template/popup_embroidery_style/tpl_main_page.php
    etc.
    and paste the provided code.

    Step 4:
    Modify the file includes/templates/your_custom_template/templates/ tpl_modules_attributes.php to your code and change the necessary bits.

    Am I right so far? Sorry I'm basically repeating what you wrote but I wanted to make sure it's right. Not only for my own clarification but for future readers' as well.

    I have a few questions/remarks:
    1. I actually did realize what was going on with the smiley face bit and got a kick out of it rendering as an actual face instead of the : p (put together) code. The only thing to make sure of is if it's supposed to be a capital P or small p.

    2. "Notice I used 3 preg_match above"
    Ok I noticed that, but if it's important, lol, I don't get it. Anything special about it, other than it needing to be there for each set of popups?

    3. This probably sounds stupid, but do I actually need to do anything to get those to SHOW the "Guidelines" link, or will they automatically show up in the "comments" section of the attributes layout? So for example, with a REGULAR attribute that isn't specified here (that doesn't need a popup) I can wrote whatever comment I want and it will show up normally (here's an example page for you, where it says, "Must select, "Yes! Engrave..."" below the attribute name. http://accessory-avenue.com/hbhcatal...roducts_id=150 ), right? But for those that were specified below and all the correct files were created, it will automatically (without putting anything in the "comments" section of the attribute name) put the "Guidelines" link to the proper popup. Right?

    4. Can the popup contain anything in it? By that I mean, a bunch of html and tables and whatnot, as if it were an actual html page that just opens in the popup? Can it have just a big image (that way if it can't have the html, I can just make a big image in Photoshop and have THAT be in the popup?)

    Thanks a TON for helping me/us on this! I really appreciate it! This will really clean up my attribute section!
    "You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

  4. #14
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    I have a few questions/remarks:
    1. I actually did realize what was going on with the smiley face bit and got a kick out of it rendering as an actual face instead of the : p (put together) code. The only thing to make sure of is if it's supposed to be a capital P or small p.

    2. "Notice I used 3 preg_match above"
    Ok I noticed that, but if it's important, lol, I don't get it. Anything special about it, other than it needing to be there for each set of popups?

    3. This probably sounds stupid, but do I actually need to do anything to get those to SHOW the "Guidelines" link, or will they automatically show up in the "comments" section of the attributes layout? So for example, with a REGULAR attribute that isn't specified here (that doesn't need a popup) I can wrote whatever comment I want and it will show up normally (here's an example page for you, where it says, "Must select, "Yes! Engrave..."" below the attribute name. http://accessory-avenue.com/hbhcatal...roducts_id=150 ), right? But for those that were specified below and all the correct files were created, it will automatically (without putting anything in the "comments" section of the attribute name) put the "Guidelines" link to the proper popup. Right?

    4. Can the popup contain anything in it? By that I mean, a bunch of html and tables and whatnot, as if it were an actual html page that just opens in the popup? Can it have just a big image (that way if it can't have the html, I can just make a big image in Photoshop and have THAT be in the popup?)
    1. small p
    2. Very important, without the call of each file for each popup. Guess What: No popup appears.
    A. I cloned CVV popup to enable this into a cart.. The .php code was the cats meow... you will need a preg_match for every popup..
    3. Example: On the site I intergrated this too:
    Bracelets: Guidlines When you click guidlines the popup appears..
    4. To your hearts content. As long as it is edited with html coding...
    Mark
    Hare Do

  5. #15
    Join Date
    Mar 2005
    Location
    Tulsa, Ok
    Posts
    174
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    Awesome. One more question and then I'll try to leave you alone until I try it out personally... say I DID want another actual page to popup instead of the html in the little window, is that possible? Not that I would ever need this example, but if I wanted Google to open up, is that possible?
    "You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

  6. #16
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    Sure you can,
    You would have to write the code for a echo in the tpl_modules_attributes.php
    1. $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ EMBROIDERY_TYPESTYLE) . '\')">
    2. you would rewrite the code above to call for an echo
    Mark
    Hare Do

  7. #17
    Join Date
    Mar 2005
    Location
    Tulsa, Ok
    Posts
    174
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    That's where my php language stops! Could you give me the coding for the www.google.com example (if I wanted that page to open as the popup)? Mainly I ask because I'm not sure yet how I want to set everything up. Luckily I think I can narrow it down all of my attributes (that need example/guidelines) to about two or three different popups, but it might be easier if I just make each one their own seperate html page, since I'm much more proficient in html. And then I could just call that html page to open. And say I did make that html page for the popup, what would I need to do for Step 2, where all the guideline information/html WOULD have gone:
    includes/languages/english/your_own_template/popup_monogram_style.php
    (I assume I could just leave it alone since it would be ignored anyway, with having called an html page instead of the info popup, right?)
    "You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

  8. #18
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    Quote Originally Posted by haredo View Post
    Sure you can,
    You would have to write the code for a echo in the tpl_modules_attributes.php
    1. $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ EMBROIDERY_TYPESTYLE) . '\')">
    2. you would rewrite the code above to call for an echo
    Ok,
    Is this what you mean...
    1. $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_BSZLNGTH) . '\')">(<u>Guidelines</u>)</a>';
      }
    2. this is replaces with:
    3. $guideLink = '<a href="http://www.google.com"><u>Google Link</u></a>';}
    Mark
    Hare Do

  9. #19
    Join Date
    Mar 2005
    Location
    Tulsa, Ok
    Posts
    174
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    I do believe that would do it, yes! Thanks! I will try to test this out tomorrow, but it might take a bit longer. I'll be back either after I try or with another question, lol! Thanks again!
    "You never really understand a person until you consider things from his point of view . . . until you climb into his skin and walk around in it." --Atticus

  10. #20
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Popup Window Via Text Link (Instead Of Image Link)

    C,
    Just take your time and duplicate the files..
    The hard one is the tpl_modules_attributes.php
    1. the lime green text has to be changed to match your subcategory name
    2. and of course that dang .
    3. Worked like a charm on a site I built.....
    4. And the beauty, Did you Notice: No core files were written on!!!!!!
    Mark
    Hare Do

 

 
Page 2 of 6 FirstFirst 1234 ... LastLast

Similar Threads

  1. Replies: 2
    Last Post: 5 Dec 2012, 05:45 AM
  2. Popup Window Via Text Link (Instead Of Image Link)
    By CelticKatt in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 17 Apr 2008, 05:09 PM
  3. Make Help link lightbox instead of popup window
    By dreamz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Feb 2008, 04:31 AM
  4. How to have product image popup instead of link?
    By drmike in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Oct 2007, 05:09 AM
  5. Basic Stuff: How do I make a text link have an image instead?
    By Kayla in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 May 2007, 09:54 PM

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