Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

catalog-product_info changes from 2.3.1 to 2.3.3


ErikMM

Recommended Posts

Posted

I started w/ 2.3.1, then upgraded to .2 and .3

 

I noticed on a later install of another shop with 2.3.2, catalog/product_info is a little different, but in 2.3.3 its night and day different

 

Any thoughts, ideas, explanations why, if I updated from 2.3.1 to 2.3.3, cat/product_info looks nothing like a 2.3.3 cat/product_info from a new download?

Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Posted

looks ok on github, and I figured out the issue...

 

but the "v2.3.3 Full Package" downlad zip file from the osc website "products page" had this file from 2002!?

 

<?php
/*
 $Id$
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2002 osCommerce
 Released under the GNU General Public License
*/
define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!');
define('TEXT_CURRENT_REVIEWS', 'Current Reviews:');
define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.');
define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');
define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>');
define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased');
define('TEXT_PRODUCT_OPTIONS', 'Available Options:');
define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');
?>

Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Posted

If the language info inside the page has not changed, then a file from 2002 is perfectly fine.

 

So, what was the problem, was it the one between monitor and keyboard ;)

Posted

don't know. the code you see above was for a 2.3.3 package downloaded from the osc product page as a current download for catalog/product_info.php

 

However, product_info should look like the code below in 2.3.1, 2.3.2, and 2.3.3(only at github)

<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
if (!isset($HTTP_GET_VARS['products_id'])) {
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

$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['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_check = tep_db_fetch_array($product_check_query);
require(DIR_WS_INCLUDES . 'template_top.php');
if ($product_check['total'] < 1) {
?>
<div class="contentContainer">
<div class="contentText">
<?php echo TEXT_PRODUCT_NOT_FOUND; ?>
</div>
<div style="float: right;">
<?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?>
</div>
</div>
<?php
} 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['products_id'] . "' 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['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
 $products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <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'];
}
?>

continues blah, blah, blah

 

when I unzipped the file and opened the catalog/product_info.php, I did not get 2010, but 2002 (as seen in my second post)

 

maybe it is me, but maybe someone else should check just in case so I know I'm not as carzy as I think I am ;)

Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Archived

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

×
×
  • Create New...