Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Looking for popup page script that works with oscommerce


halltristan

Recommended Posts

I'de like to have a popup page on the index.php - something where I could advertise a new product or whatever. I've already looked at the contributions section, there's only one for popup pages - and it sucks.

Does anyone know how to go about this?

 

Even better would be an admin feature where I could turn the pop-up on and off from the control panel/admin section. - That would be cool to have but it might be to complicated.

Link to comment
Share on other sites

Ok, for an admin controllable feature, you will need to insert a command into the database.

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Main Page Pop-Up', 'MAIN_PAGE_POPUP', 'true', 'Do you want to display the Index Popup?', '1', '30','tep_cfg_select_option(array(\'true\', \'false\'), ', now());

 

Then in Index.php, you will need the popup code.

 

<?php
if (MAIN_PAGE_POPUP == 'true') {
?>

Insert Popup command here

<?php
} // Close IF MAIN_PAGE_POPUP
?>

 

Unsure on Pop-up scripts etc, but a quick search on google reveals lots of different codes.

 

Now in Admin, under configuration, you should be able to turn this on and off.

Link to comment
Share on other sites

Hi,

Just add this line within the body tag:

onLoad="MM_openBrWindow('example.htm','','scrollbars=yes,width=250')"

 

Where example.htm is the name of your file

width tells it how wide to open the window (height is default length of page)

scrollbars=yes (will add scroll bars if needed only)

 

That should do it. Look for the body tag in the page you want the pop-up after the initial php code on the page, it's there, just look for it!

 

Good Luck!

:lol:

MV

 

 

I'de like to have a popup page on the index.php - something where I could advertise a new product or whatever. I've already looked at the contributions section, there's only one for popup pages - and it sucks.

Does anyone know how to go about this?

 

Even better would be an admin feature where I could turn the pop-up on and off from the control panel/admin section. - That would be cool to have but it might be to complicated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...