Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Products Specifications


kymation

Recommended Posts

  • 2 weeks later...

I installed 1.0.2 on a fresh 2.2 rc2 and I get this

 

 

1054 - Unknown column 'approved' in 'where clause'

 

select count(*) as count from reviews where products_id = '1' and approved = '1'

 

[TEP STOP]

Link to comment
Share on other sites

Another issue. When I link a specification group to a category I get this error, unlinking fixes the problem

 

I tried the changes listed here but no difference http://www.oscommerce.com/forums/topic/230304-1054-unknown-column-pproducts-id-in-on-clause/

 

1054 - Unknown column 'products_car_make' in 'where clause'

 

select count(p.products_id) as count from (products p) join (products_to_categories p2c) on (p.products_id = p2c.products_id) left join (specials s) on (p.products_id = s.products_id) where p.products_status = '1' and p2c.categories_id in (116,117,120,122,123,124) AND products_car_make <=> 'Car Make'

Link to comment
Share on other sites

I installed 1.0.2 on a fresh 2.2 rc2 and I get this

 

 

1054 - Unknown column 'approved' in 'where clause'

 

select count(*) as count from reviews where products_id = '1' and approved = '1'

 

[TEP STOP]

 

You will want to find the offending line and use "status" rather than "approved" - that should work...

-Dave

Link to comment
Share on other sites

Another issue. When I link a specification group to a category I get this error, unlinking fixes the problem

 

I tried the changes listed here but no difference http://www.oscommerce.com/forums/topic/230304-1054-unknown-column-pproducts-id-in-on-clause/

 

1054 - Unknown column 'products_car_make' in 'where clause'

 

select count(p.products_id) as count from (products p) join (products_to_categories p2c) on (p.products_id = p2c.products_id) left join (specials s) on (p.products_id = s.products_id) where p.products_status = '1' and p2c.categories_id in (116,117,120,122,123,124) AND products_car_make <=> 'Car Make'

 

try removing the AND products_car_make <=> 'Car Make' part.... doesn't belong there by osc default... unless your selling car parts?

 

it's more than that though... Jim will have to chime in on that

@@kymation

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

i get the same issue using a vanilla field as an extra field.

 

the only thing I can think at the moment that is causing these issues is encoding, i am dealing with greek letters.

 

I try a filter by price and it works perfectly

Link to comment
Share on other sites

@@RMD27 First, delete that ancient 2.2RC2a install and install 2.3.3.4. That old code is insecure and will not run on a modern server. There is no reason to start with that old code at this late date.

 

There is no products_car_make in this addon package. Did you install the YMM addon instead of this one, or in addition to this one?

 

Extra fields in Product Specifications are created by setting up Specifications. It that what you are talking about? If so, there is code in the latest version of PS to deal with the encoding issues. It probably won't work with the older versions of osCommerce as they use different encoding.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

i also found an issue where it was moving the right column to the bottom left in the product_info file. I used the following product_info which I made myself using beyond compare and it seems to work but I stand to be corrected

 

<?php
/*
 $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce
 Released under the GNU General Public License
*/
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
// Start Products Specifications
 require_once (DIR_WS_FUNCTIONS . 'products_specifications.php');
 // Handle the output of the Ask a Question form
 $from_name = '';
 $from_email_address = '';
 $message = '';
 $error_string = '';
 if (isset($_GET['action']) && ($_GET['action'] == 'process') ) {
   $error = false;
   $to_email_address = STORE_OWNER_EMAIL_ADDRESS;
   $to_name = STORE_OWNER;
   $from_email_address = tep_db_prepare_input ($_POST['from_email_address']);
   $from_name = tep_db_prepare_input ($_POST['from_name']);
   $message = tep_db_prepare_input ($_POST['message']);
   if (empty ($from_name) ) {
  $error_string .= 'name';
  $error = true;
   }
   if (!tep_validate_email($from_email_address)) {
  if ($error == true) {
    $error_string .= '-';
  }
  $error_string .= 'email';
   }
   if ($error == false) {
  $email_subject = sprintf (TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME);
  $email_body = sprintf (TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], $product_info['products_model'], STORE_NAME) . "\n\n";
  if (tep_not_null($message)) {
    $email_body .= $message . "\n\n";
  }
  $email_body .= sprintf (TEXT_EMAIL_LINK, tep_href_link (FILENAME_PRODUCT_INFO, 'products_id=' . $_GETS['products_id']) ) . "\n\n" .
				 sprintf (TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
  tep_mail ($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);
  $messageStack->add_session ('header', sprintf (TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected ($to_name) ), 'success');
  tep_redirect (tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params (array ('action', 'tab') ) . 'action=success&tab=ASK'));
   } else {
  tep_redirect (tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params (array ('action', 'tab') ) . 'tab=ASK&error=' . $error_string));
   }
 } elseif (tep_session_is_registered ('customer_id') ) {
   $account_query = tep_db_query ("select customers_firstname,
									   customers_lastname,
									   customers_email_address
							   from " . TABLE_CUSTOMERS . "
							   where customers_id = '" . (int) $customer_id . "'
							 ");
   $account = tep_db_fetch_array($account_query);
   $from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
   $from_email_address = $account['customers_email_address'];
 }
 // Handle errors -- missing name or invalid email. We don't check the message field.
 if (isset ($_GET['error']) && $_GET['error'] != '') {
   $error_array = explode ('-', $_GET['error']);
   for ($index=0, $end=count($error_array); $index<$end; $index++) {
  if ($error_array[$index] == 'name') {
    $messageStack->add ('ask', ERROR_FROM_NAME);
  } else {
    $messageStack->add ('ask', ERROR_FROM_ADDRESS);
  } // if ($error_array .... else ...
   } // for ($index=0
 } // if (isset
// End Products Specifications
 $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);
?>
<!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=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<?php
// Start Products Specifications
 if (SPECIFICATIONS_BOX_FRAME_STYLE == 'Tabs') {
?>
 <link href="style_tabs.css" rel="stylesheet" type="text/css">
 <script language="javascript" type="text/javascript" src="includes/functions/jquery-1.3.2.min.js"></script>
 <script language="javascript" type="text/javascript">
   $(document).ready(function(){ 
  initTabs(); 
   }); 
   function initTabs() { 
  $('#tabMenu a').bind('click',function(e) { 
  e.preventDefault(); 
  var thref = $(this).attr("href").replace(/#/, ''); 
  $('#tabMenu a').removeClass('active'); 
  $(this).addClass('active'); 
  $('#tabContent div.content').removeClass('active'); 
  $('#'+thref).addClass('active'); 
  }); 
   } 
 </script>
<?php
 }
// End Products Specifications
?>
<script language="javascript" type="text/javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php // Products Specifications echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {
?>
  <tr>
    <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
	    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		    <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
	    </table></td>
	  </tr>
    </table></td>
  </tr>
<?php
 } else {
// Products Specifications
   $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, pd.products_tab_1, pd.products_tab_2, pd.products_tab_3, pd.products_tab_4, pd.products_tab_5, pd.products_tab_6 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 = '<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'];
   }
?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
	    <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" cellspacing="0" cellpadding="2" align="right">
	    <tr>
		  <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>
	    </tr>
	  </table>
<?php
   }
?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
  <?php
// Start Products Specifications
   include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS);
   echo tep_draw_form ('cart_quantity', tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params (array ('action') ) . 'action=add_product') );
// End Products Specifications
?>


<?php
   $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
<?php
// Start Products Specifications
?>
	  <table border="0" cellspacing="0" cellpadding="2" align="left" width="100%">
	    <tr>
		  <td>
<?php
// End Products Specifications
?>
	  <table border="0" cellspacing="0" cellpadding="2">
	    <tr>
		  <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
	    </tr>
<?php
  $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
  while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
    $products_options_array = array();
    $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
    while ($products_options = tep_db_fetch_array($products_options_query)) {
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
	  if ($products_options['options_values_price'] != '0') {
	    $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	  }
    }
    if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
    } else {
	  $selected_attribute = false;
    }
?>
	    <tr>
		  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
		  <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
	    </tr>
<?php
  }
?>
	  </table>
<?php
   }
?>
    </td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
   $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
   $reviews = tep_db_fetch_array($reviews_query);
   if ($reviews['count'] > 0) {
?>
  <tr>
    <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
   }
   if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
    <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
   }
   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
  <tr>
    <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
  </tr>
<?php
   } else {
?>
  <tr>
    <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
  </tr>
<?php
   }
?>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
	    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		    <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
		    <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
	    </table></td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td>
<?php
   if ((USE_CACHE == 'true') && empty($SID)) {
  echo tep_cache_also_purchased(3600);
   } else {
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
   }
 }
?>
    </td>
  </tr>
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Hello Jim, I have a 2.2 already with the security fixes, hence why I am testing on a new 2.2 rc2.

 

The extra field is what i created but it does not make a difference if i use that or products_name (for example)

 

I have to use fields in the product_descrips table because I only use Easy Populate to edit products

 

in summary, it is probably an encoding issue?

 

let me test some english products so I know for sure it is encoding. i will post my results when i have them, hopefully in the next hour

Edited by RMD27
Link to comment
Share on other sites

What are you going to do when your host updates their PHP/MySQL to a newer version and your 2.2 code stops working? There is a limit to how much you can patch that old code.

 

Products Specifications will not recognize extra fields that you have created yourself or added via another addon. You must create the fields as specifications in PS. Of course you can modify PS to recognize your extra fields if you want to do all that coding.

 

It sounds like you have an encoding issue, although I can't be certain from here. That old version of PS does not recognize characters that are not in the Latin-1 character set, so other encodings will not work. You could try to incorporate the encoding fixes from the latest version of PS, but I can't guarantee that it will work. There is a reason that osCommerce changed the encoding to UTF-8.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

So I tried latin and same issue. Numbers okay, text not okay.

 

I think i need to modify each file manually.

 

Your code is designed to work with extra fields in the product_description table (+fields in the PS table). That is what it says anyway!

Link to comment
Share on other sites

It can work with extra fields in the products_description table, but it's kind of a hack. It would be better to use the modifications to Easy Populate and use PS to create the fields. Maybe. It's your store, so you decide what's best for you.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

So im using a fresh copy of 2.3.

 

In the admin > modules > boxes i do not see the filter box. (So i can install it, to see on the catalog side)

 

bm_products_filter has been uploaded

 

am i missing something when it comes to installing new modules/boxes on 2.3??

Link to comment
Share on other sites

You need to upload includes/modules/boxes/bm_products_filter.php and includes/languages/english/modules/boxes/bm_products_filter.php. Then log into your Admin and navigate to modules >> boxes and click the Install button. The filters box should then show up in the list of boxes that can be installed.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thought I had all issues figured out. I just installed the product filter module and as soon as I do this the page now isntead of losing fine gives me the below error. I have done some searching and nothing.

 

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/gthawk/public_html/luxeoutdoor.ca/includes/classes/specifications.php on line 17

 

 

Line 17 is this

 

private $specs = array ();

 

Specifically this is in the class specification listed below. so any help would be great.

 

 

 

class Specifications {

private $specs = array ();

private $applied_filters = array ();

private $current_category_id;

private $languages_id;

 

public function __construct() {

global $current_category_id, $languages_id;

 

$this->current_category_id = $current_category_id;

$this->languages_id = $languages_id;

 

$this->setAppliedFilters();

}

Link to comment
Share on other sites

Are you running a really old version of PHP? This code will not run on PHP 4.x, and probably not on anything older than 5.2.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Yes, you're overdue for an upgrade. PHP 4 is no longer supported, and I believe it has some security holes. The core osCommerce code still runs on it, but probably not for much longer.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

logged into my cpanal and aparneltay i could just switch to v5. v4 is just the default, go figure. did the change and now i am on 5.2.16 and not crashing. Not seeing the module pop up but betting that's more config I have to much with..

Edited by GTHawk
Link to comment
Share on other sites

@@kymation I hope you can shed a little light on this - I have a back button no longer working, and I think changes made during the adding of products specifications may need me to make some adjustment... not sure what though. Ver is 2.3.3.4 and seo2.2.d

 

if I go to a product review, I land at

url...-pri-29.html?reviews_id=4

 

The back button on that page

<?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id')))); ?>

 

takes me to a broken link

url...-pr-29.html

 

Is something missing in the above? or did adding the reviews tab also change or somehow disable the standard pr product_reviews page to where I need to adapt the rewrite rules?

 

RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

 

On the product_info page, the reviews tab is

url...-p-29.html#tabs-9

 

What do I do!? Thanks again for any help.

-Dave

Link to comment
Share on other sites

If you are using the tabs provided with the PS addon, the Product Review page is no longer used, as that function is now in a tab. So how are you getting to that page, and why?

 

I seem to recall that your URL rewriter does not deal well with URLs that contain a hash, and the jQuery tabs use the hash to trigger a Javascript rewrite of the URL.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Please clarify, are you saying I have a function somewhere that is not correct? - Yes I am using the tabs that came with PS (they are awesome btw)

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

As a temporary quick fix, I changed the back button link to like this

<?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $review['products_id'])); ?>

 

Which at least takes me to the product page instead of a broken -pr- page

 

Would be nice to append the #tabs-9 but haven't figured that one out yet.

-Dave

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