osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Adding a pop-up image to a column box

This is a discussion on Adding a pop-up image to a column box within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; I'm really hoping that someone can help me with this one. I need to add 3 links to pop-up images ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-06-2005, 04:43 AM
Member
 
Join Date: Jan 2005
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Lobotaman
Default Adding a pop-up image to a column box

I'm really hoping that someone can help me with this one. I need to add 3 links to pop-up images in a new column box I've made. Can somebody please tell me how to do this?

[1] What does the href code look like and which file does it go in?
[2] Where do I put the 3 jpg files?


I can't seem to get this to work and I don't want to add the images to the product catalog.

Thanks to anyone who can help ~ I really appreciate it!

Lobo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 02-08-2005, 10:16 AM
Member
 
Join Date: Jan 2005
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Lobotaman
Default Any takers? ( p l e a s e ? )

When I posted the original post 3 days ago, I had already given this a shot - without any luck.

At this point, I've definitely exhausted my attempts to fix this one. It's totally beyond me. Each of those links in the info boxes has an intricate connection between about three different files.

I can't tell if I'm close or not. So, now, I'm back to the starting point - I have following the instructions from the dox on "Adding a New Box" ~ but I can't get the final part done.

Please take a shot at helping me!

Lobo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 02-08-2005, 07:33 PM
New Member
 
Join Date: Nov 2004
Location: CA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
rocky76
Default

It's not exactly clear what you're asking for. Please expound.

1. Do you have a link to the site so we may see your progress so far?
2. Did you get your box up and running yet?
3. Are you trying to put these three images inside the box or are you trying to make text links to the images?
4. You can post your code.

rocky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 02-08-2005, 08:22 PM
Member
 
Join Date: Jan 2005
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Lobotaman
Default A clarification as requested...

I'm hesitant to put the site up there until I get things a bit more secure.

However, here is the clarification you asked for...

The shop will allow customers to customize their purchase with their choice of fonts from a dropdown menu when they add to their cart.

To allow viewing of the fonts, I want an info box in the right column with three of the same links that are used in the "click to enlarge" on the product pages.

But, I don't want these images to be in the product database. I just want the link to pop up a jpeg image from a folder to allow a visitor to see the font selections. (it will take 3 pages to allow for all of the fonts to be viewed).

I hope this helps and I hope you can help me. I have the test box in the right column as per the walkthrough provided at osMAX. But, what next?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 02-08-2005, 09:45 PM
New Member
 
Join Date: Nov 2004
Location: CA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
rocky76
Default

Here's some clarification about oscommerce. You can upload images, anywhere you want to your store, they don't have to be uploaded throught the admin control panel. So think of the info box like a regular HTML page and insert plain old HTML in the PHP file that makes your custom info box.

Example:
1. Upload font_futura.gif to your server anywhere that makes sense to you.
2. Type the correct html in the php file to link to the image... <a href="http://www.yoursite.com/font_futura.gif>Futura Font Example</a>
That will give you a text link that when clicked will show the image in the existing window. If you want to have it open in a new window then you're gonna need some simple popup window javascript.

Hope that gets you jump started.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 02-09-2005, 09:47 AM
Member
 
Join Date: Dec 2004
Posts: 75
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 4
bdneuman is on a distinguished road
Default Re: Any takers? ( p l e a s e ? )

Quote:
Originally Posted by Lobotaman
When I posted the original post 3 days ago, I had already given this a shot - without any luck.

At this point, I've definitely exhausted my attempts to fix this one. It's totally beyond me. Each of those links in the info boxes has an intricate connection between about three different files.

I can't tell if I'm close or not. So, now, I'm back to the starting point - I have following the instructions from the dox on "Adding a New Box" ~ but I can't get the final part done.

Please take a shot at helping me!

Lobo
Yes, you can just add the link to the image as suggested above. This is what I had done at first, then I switched to a java window. Check out the "Color Chart" under the "Resources" infobox here:

http://www.honeybeadjewelry.com/catalog/index.php

I have all of the required java in my catalog/includes/boxes/resources.php file. Here's the file for reference. Note, the Resources box is not included in stock install - I created it for my shop, but you can add the code to any of the existing infoboxes, too.

Note, you'll need to define your filenames in includes/filenames.php as well.


Code:
<?php
/*
  $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $
  modified by paulm_nl 2003/12/23
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
?>

[color=blue]<!-- popup scripts //-->
<script language="javascript"><!--
function opencolorchart() {
if (!window.msgWindow1) {
	msgWindow1 = window.open('','newWin1','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
      msgWindow1.location.href = 'http://www.honeybeadjewelry.com/catalog/color_chart_popup.htm';
	}
	else {
		if (!msgWindow1.closed) {
		msgWindow1.focus();
		}
		else {
			msgWindow1 = window.open('','newWin1','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
      		msgWindow1.location.href = 'http://www.honeybeadjewelry.com/catalog/color_chart_popup.htm';
		}
	}
}

function openbirthstonechart() {
if (!window.msgWindow2) {
 	msgWindow2 = window.open('','newWin2','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
    	msgWindow2.location.href = 'http://www.honeybeadjewelry.com/catalog/birthstone_colors_popup.htm';
	}
	else {
		if (!msgWindow2.closed) {
		msgWindow2.focus();
		}
		else {
			msgWindow2 = window.open('','newWin2','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
    			msgWindow2.location.href = 'http://www.honeybeadjewelry.com/catalog/birthstone_colors_popup.htm';
		}
	}
}

function openclaspselection() {
if (!window.msgWindow3) {
	msgWindow3 = window.open('','newWin3','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
    	msgWindow3.location.href = 'http://www.honeybeadjewelry.com/catalog/clasp_selection_popup.htm';
	}
	else {
		if (!msgWindow3.closed) {
		msgWindow3.focus();
		}
		else {
			msgWindow3 = window.open('','newWin3','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
    			msgWindow3.location.href = 'http://www.honeybeadjewelry.com/catalog/clasp_selection_popup.htm';
		}
	}
}

//--></script>[/color]

<?php
  $boxHeading = BOX_HEADING_RESOURCES;
  $corner_left = 'rounded';
  $corner_right = 'rounded';
  $box_base_name = 'resources'; // for easy unique box template setup (added BTSv1.2)

  $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)

  $boxContent = '<a href="' . tep_href_link(FILENAME_FAQS) . '"> ' . BOX_RESOURCES_FAQS . '</a><br>' .
		   [color=blue] '<a href="javascript:opencolorchart(\'' . tep_href_link(FILENAME_COLOR_CHART) . '\')">' . BOX_RESOURCES_COLOR_CHART . '</a><br>'.
                '<a href="javascript:openbirthstonechart(\'' . tep_href_link(FILENAME_BIRTHSTONE_CHART) . '\')">' . BOX_RESOURCES_BIRTHSTONE_COLORS . '</a><br>'.
                '<a href="javascript:openclaspselection(\'' . tep_href_link(FILENAME_CLASP_SELECTION) . '\')">' . BOX_RESOURCES_CLASP_SELECTION . '</a><br>'.[/color]                '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . LINKS . '</a><br>';
;

// bof BTSv1.2
  if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) {
  // if exists, load unique box template for this box from templates/boxes/
      require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php');
  }
  else {
  // load default box template: templates/boxes/box.tpl.php
      require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX);
  }
// eof BTSv1.2
?>[color=blue][/color]
The files that are called in the above FILENAME_COLOR_CHART is an html file that looks like this:

color_chart.htm

Code:
<HTML>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function openpopup() {
 msgWindow = window.open('','newWin','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=1,menubar=0,toolbar=0,scrollbars=0');
    msgWindow.location.href = 'http://www.honeybeadjewelry.com/catalog/color_chart_popup.htm';
    self.close();
}
//  End -->
</script>

<TITLE></TITLE>
<meta name="description" content="Whatever words you want">
<meta name="keywords" content="word, word, a phrase or two, word">
<link rel="STYLESHEET" type="text/css" href="stylesheet.css">
</HEAD>
<BODY class=body onLoad=openpopup() scroll=no>
Hope this helps!
__________________
Brian Neuman
Webmaster
www.honeybeadjewelry.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 02-09-2005, 09:56 AM
Member
 
Join Date: Jan 2005
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Lobotaman
Default BINGO! That is exactly what I'm looking for!

It didn't turn out blue, but I can find see where it should have been blue.

This is precisely what I was looking for.

I am assuming you did this in oscMAX (hopefully) and I'll be giving it a try tonight.

Thank you for replying, in fact, thank you VERY much!

I actually did already see your site. I went there looking for something else I found in a thread. (I think it was about adding text to customize something when making a purchase - but I forget.)

Thanks again,

Lobo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 02-13-2005, 08:29 PM
Member
 
Join Date: Jan 2005
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Lobotaman
Default That pop-up script won't work in Netscape ~ just an FYI

I am still working on this and, thus far, have been unable to make it work in Netscape.

Not sure whether or not you know it, but yours will not work in NS7+

I will post something here if/when I find a solution.

John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 02-14-2005, 05:27 AM
Member
 
Join Date: Dec 2004
Posts: 75
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 4
bdneuman is on a distinguished road
Default Re: That pop-up script won't work in Netscape ~ just an FYI

Quote:
Originally Posted by Lobotaman
I am still working on this and, thus far, have been unable to make it work in Netscape.

Not sure whether or not you know it, but yours will not work in NS7+

I will post something here if/when I find a solution.

John
Thanks for the heads up - I hardly ever check my pages in Netscape like I know I should. I'll look into this tonight and see what I can come up with. Let me know if you do...
__________________
Brian Neuman
Webmaster
www.honeybeadjewelry.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 02-14-2005, 09:26 PM
Member
 
Join Date: Dec 2004
Posts: 75
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 4
bdneuman is on a distinguished road
Default Re: That pop-up script won't work in Netscape ~ just an FYI

Quote:
Originally Posted by Lobotaman
I am still working on this and, thus far, have been unable to make it work in Netscape.

Not sure whether or not you know it, but yours will not work in NS7+

I will post something here if/when I find a solution.

John
Okay, I think I've got it. Here's what I did.

In catalog/includes/resources, I added the resizeTo here like this:

Code:
<!-- popup scripts //-->
<script language="javascript"><!--
function opencolorchart() {
if (!window.msgWindow1) {
	msgWindow1 = window.open('','newWin1','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=0,menubar=0,toolbar=0,scrollbars=0');
      msgWindow1.location.href = 'http://www.honeybeadjewelry.com/catalog/color_chart_popup.htm';
	msgWindow1.resizeTo(700,600);
	}
	else {
		if (!msgWindow1.closed) {
		msgWindow1.focus();
						}
		else {
			msgWindow1 = window.open('','newWin1','width=100,height=100,screenX=100,screenY=100,top=100,left=100,resizable=0,menubar=0,toolbar=0,scrollbars=0');
      		msgWindow1.location.href = 'http://www.honeybeadjewelry.com/catalog/color_chart_popup.htm';
			msgWindow1.resizeTo(600,400);
			}
		}
}
Then in color_chart_popup.htm, I removed the script from the head so that all that is left is:

Code:
<HTML>
<HEAD>

<TITLE></TITLE>
<meta name="description" content="Whatever words you want">
<meta name="keywords" content="word, word, a phrase or two, word">
<link rel="STYLESHEET" type="text/css" href="stylesheet.css">
</HEAD>

<CENTER>
<TABLE>
    <tr>
	<TD class=main>
	    <IMG SRC=http://www.honeybeadjewelry.com/images/color_chart.jpg>
      </td>
    </tr>
    <tr>
	<td>
	    <CENTER>
	    <form>
	    <input type=button value="Close Window" onClick="javascript:window.close();">
	    </form>
	    </CENTER>
      </td>
    </tr>
</table>
</CENTER>
Works in IE and Netscape.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Adding an image next to the name link at allprods.tpl.php icecold osCMax v2 Customization/Mods 0 07-19-2005 04:08 AM
Add image to column gamefreak7 osCMax v2 Customization/Mods 1 07-14-2005 10:54 PM
Adding column in admin Orders page mat123slade osCMax v1.7 Discussion 0 12-21-2004 01:41 AM
Adding Image above a box sillykc osCommerce 2.2 Modification Help 0 02-12-2004 01:42 PM
background image in left column - how to in mAX? starchild osCMax v1.7 Discussion 2 09-10-2003 09:55 PM


All times are GMT -8. The time now is 12:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax