Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with other Contribution since install


Guest

Recommended Posts

Since installing this my pop-up image info contribution comes up blank. Here is the entire pop-up image.php and only code for that contribution. Please take a look and see if your contribution could be affecting it, and what changes I need to get it to show your info and not just the regular price. Thanks your help is greatly appreciated. :)

<?php

/*

  $Id: popup_image.php,v 1.18a 2004/07/06 12:52:23$

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  require('includes/application_top.php');

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

  $navigation->remove_current_page();

 

  $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_price, p.manufacturers_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");

  $products = tep_db_fetch_array($products_query);

 

  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

  $product_check = tep_db_fetch_array($product_check_query);

 

  if (isset($HTTP_GET_VARS['pID'])) {

    $manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p  where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.manufacturers_id = m.manufacturers_id");

    if (tep_db_num_rows($manufacturer_query)) {

      $manufacturer = tep_db_fetch_array($manufacturer_query);

    }}

 

  if ($product_check['total'] < 1) {

  } else {

    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

    $product_info = tep_db_fetch_array($product_info_query);

 

    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and language_id = '" . (int)$languages_id . "'");

 

    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

      $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

    } else {

      $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

    }

 

    if (tep_not_null($product_info['products_model'])) {

      $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

    } else {

      $products_name = $product_info['products_name'];

    }}

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title><?php echo $products['products_name']; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<script language="javascript"><!--

var i=0;

function resize() {

  if (navigator.appName == 'Netscape') i=40;

  if (document.images[0]) window.resizeTo(document.images[0].width +100, document.images[0].height+200-i);

  self.focus();

}

//--></script>

<link href="stylesheet.css" rel="stylesheet" type="text/css">

</head>

<body onload="resize();" onContextmenu="alert('Not allowed.'); return false">

<table width="100%" height="100%" cellpadding="0" cellspacing="0">

<tr>

<td><table align="center" border="0" cellspacing="0" cellpadding="0">

<td class="main" align="center"><h2><?php echo $products['products_name']; ?></h2></td>

</tr>

<tr align="center">

<td><?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?></td>

</tr>

<tr>

<td class="main" align="center"><?php echo $products['products_name']; ?><br>

                                <?php echo $manufacturer['manufacturers_name']; ?><br>

                                <?php echo $products_price; ?></td>

</tr>

</table>

</td>

</tr></table>

</body>

</html>

<?php require('includes/application_bottom.php'); ?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...