Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi

 

I was hoping one of you brain boxes could help make a new contribution to help me and others at osC.

 

The problem i am having is that i have various products that have different sizes so the size info page i have is too long and looks untidy.

 

So i was hoping someone or a few of you could put together a contribution that if i click a button in the product info page it would give me a pop up box with just the sizes of that product.

 

It would be good if someone could make this easy to change the sizes without knowing to much about php.

 

I have searched for this but we have no size box contribution as yet.

 

Pls let us know if anyone is interested in taking on this challenge, if we did have we did have this im sure lots of others would use it ? :D

 

Regards

Posted

1)In product_info.php add (just add the parts that are not there);

 

This is the JS code that works for any name you give the popup so you don't have to add additional code for each popup, just include this once and you are done this part.

 

<script language="javascript" type="text/javascript">
<!--
var open_window = false;
var new_window = null;

function openwindow(url,width,height,resizable,scrollbars,posx,posy)
{
if(posx==null) posx = 20;
if(posy==null) posy = 20;
now = new Date();
new_window=window.open(url, now.getHours()+now.getMinutes()+now.getSeconds(), 'width='+width+',height='+height+',resizable='+resizable+',scrollbars='+scrollbars+',screenY='+posy+',screenX='+posx+',top='+posy+',left='+posx);

try {
new_window.focus();
} catch(e) {}
}
//-->
</script>
</head>

 

2) In your admin add where you want the popup to be (in your product description section) ;

 

<a href="javascript:openwindow('/popup_whatever.php', 450, 450, 0, 0)">What Ever Text</a>

 

3) Create a page called catalog/popup_whatever.php (text area examle)

 

<!-- body //-->
<table width="450px" bgcolor="#663300" border="0" align="center" cellspacing="0" cellpadding="10">
 <tr>
<!-- body_text //-->
<td class="main" align="center">
<b>What Ever Page Title</b><br />
<p align="left">
What ever page text<br />
</p>
<p class="smallText" align="center">
<?php echo '<a href="javascript:window.close()">Close Window</a>'; ?>
</p> </td></tr></table>
</body></html>

 

 

This will allow you to create popups with any name you choose in the product descriptions area.

  • 3 weeks later...
Posted

Thanks Peter - this is very cool.

 

I would like to have the option to use the scrollbars but can't find out how to change the code you provided - - could you possibly provide me with that?

 

Checked out your website and I find it to be excellent and very inspiring. I too have gotten a package from VN2 - but certainly can't compare with the look you've developed; although just might with the next site LOL!!

 

Thanks alot for the popup code and if you have the addition that would be aweseome.

 

All the very best

Ron

Posted
Thanks Peter - this is very cool.

 

I would like to have the option to use the scrollbars but can't find out how to change the code you provided - - could you possibly provide me with that?

 

Checked out your website and I find it to be excellent and very inspiring. I too have gotten a package from VN2 - but certainly can't compare with the look you've developed; although just might with the next site LOL!!

 

Thanks alot for the popup code and if you have the addition that would be aweseome.

 

All the very best

Ron

 

you might also consider using DHTML instead of a popup. The DHTML "table" can be set hidden (use CCS) and when they click the link the DHTML opens up IN the page. This has the added benefit of loading the data on the page where it can be indexed by google and other engines.

 

(also, after talking with any number of users, I have been told that popups are ANNOYING. A look at my sites stats show that people do use the "view larger image", but after talking to a number of customers I plan on changing that from a popup to a DHTML layer that displays OVER the page in the browser. Less bandwidth used, faster loading, no additional instances of the browser have to be opened and closed...)

Posted

Thank You JM - I am certainly interested in the DHTML you suggest - -

 

If it's not too much hassle, could I ask if you have link to where I can see it in action, and

 

Where can I get the codes and learning info to impliment it?

 

I agree with your evaluation of the pop-ups but it was the best solution I could find - now this sounds even better!

 

Thanks - I look forward to hearing back

 

Ron

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...