Hey haredo,
Just thought I'd see how the mod-finding went! Were you able to find your notes?
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
Are you ready for some Football.
Step 1
Step 2includes/ extra_datafiles/
- create a php. file called:
- popup_monogram_style.php
- Now inside this file copy and paste:
HTML Code:<?php // About Us Filename Define define('FILENAME_POPUP_MONOGRAM_STYLE', 'popup_monogram_style'); ?>
Step 3includes/ languages/ english/ your_own_template/
- create a .php file called
- popup_monogram_style.php
- Now inside this file copy and paste:
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]'); ?>
- This will be the file you will edit for a customer to view the popup
Step 4includes/ templates/ your_custom_template/
- create a new folder called:
- popup_monogram_style
- Inside this folder, create a .php file called:
- tpl_main_page.php
- now inside this file paste and copy
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>
includes/ templates/ your_custom_template/ templates/ tpl_modules_attributes.php
- You are going to edit this puppy.
- Find this:
HTML Code:<h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3> <?php }- Right blow this Add the following:
- 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;
?>- The lime green font above will change to your subcategory name.
- I did not have a url to your web site to view so I just put up wording
- That freekin smile face, must be the code to enter needs to be changed:
- delete the with : p No space between the colon & p Of all times it happens
- 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..
- I edited all the proper files for the first preg_match to work
- Your will half to clone the rest for all of the popups you want
- Notice I used 3 preg_match above
- 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
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
1. small pI 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?)
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
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
Sure you can,
You would have to write the code for a echo in the tpl_modules_attributes.php
- $guideLink = '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ EMBROIDERY_TYPESTYLE) . '\')">
- you would rewrite the code above to call for an echo
Mark
Hare Do
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
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
C,
Just take your time and duplicate the files..
The hard one is the tpl_modules_attributes.php
- the lime green text has to be changed to match your subcategory name
- and of course that dang .
- Worked like a charm on a site I built.....
- And the beauty, Did you Notice: No core files were written on!!!!!!
Mark
Hare Do
Bookmarks