Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with popup window script


travtele615

Recommended Posts

Posted

I installed the "All Manufacturers Contribution v.1 for osCommerce 2.2" and it's working great. I'm working on an art gallery store and am trying to incorporate a javascript pop-up window to show bio's for each artist.

 

The output on the All Manufactuer's page appears to be working because all the biograhy links show different Manufacturer ID's at the end as below

 

java script:popupWindow('http://testing.travajen.com/catalog/popup_all-artists_info.php?manufacturers_id=12')

 

This code below appears to be my database logic to populate the pop up window. The only problem I'm having is that I get all the info for the 1st item in Database regardless of the ID number the link above passes. (or obviously doesn't) to the popup routine.

 

Skill Level: I know just enough about PHP and JS to be dangerous, mostly to myself and know lot's more about backing up and renaming orignal files.

 

  $manufacturer_query = tep_db_query("select manufacturers_id, manufacturers_name, manufacturers_text, manufacturers_image from " . TABLE_MANUFACTURERS );
 if (tep_db_num_rows($manufacturer_query)) {
$manufacturer = tep_db_fetch_array($manufacturer_query);

$manufacturer_url_query = tep_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . $manufacturer['manufacturers_id'] . "'");
$manufacturer_url_values = tep_db_fetch_array($manufacturer_url_query);
$has_manufacturer_url = ($manufacturer_url_values['manufacturers_url']) ? 'true' : 'false';

 

Thanks for your time

Travis

Archived

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

×
×
  • Create New...