Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

All Products Contribution


pulp2

Recommended Posts

I couldn't find an All Products support forum, so I was hoping you guys could help me here. :)

 

The problem I am having is when going to the allprods.php page instead of showing all the products I get this:

 

Displaying 1 to 20 (of 186 products) Result Pages: 1 2 3 4 5 ... [Next >>]

0 -

 

select p.products_id, products_weight, p.products_quantity, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' left join specials s on p.products_id = s.products_id where pd.products_name like '%' AND p.products_status='1' order by p.products_sort_order limit 0, 20

 

[TEP STOP]

 

I have ran the allprods.sql in phpMyAdmin...

 

Any ideas of why it might be doing this?

 

I have Ultimate SEO urls installed could this be it?

 

 

Any help appreciated!

Link to comment
Share on other sites

Looks like there is an error in the syntax of the page.

 

Check that the changes that should be made have been made in the right place.

 

A missing ; or ) can break a page big time.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Looks like there is an error in the syntax of the page.

 

Check that the changes that should be made have been made in the right place.

 

A missing ; or ) can break a page big time.

 

Thanks for the reply Geoffrey!

 

I'm not seeing anything missing.... But then again I don't have the best php debugger (ultraedit)

 

Here is the code, if anyone can find anything at all please let me know:

 

<?php 
/* 
$Id: allprods.php,v 4.4 2006/09/18 20:28:47 Mgx Co. Exp $


All Products v4.3 MS 2.2 with Images http://www.oscommerce.com/community/contributions,1501

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2004 osCommerce

Released under the GNU General Public License

*/ 

require('includes/application_top.php'); 
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ALLPRODS); 

$breadcrumb->add(HEADING_TITLE, tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL')); 

$firstletter=$HTTP_GET_VARS['fl'];
if (!$HTTP_GET_VARS['page']){
 $where="where pd.products_name like '$firstletter%' AND p.products_status='1' ";
}else {
 $where="where pd.products_name like '$firstletter%' AND p.products_status='1' ";
} 


?> 
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html <?php echo HTML_PARAMS; ?>> 
<head> 
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.55 
// Replaced by header_tags.php 
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { 
 require(DIR_WS_INCLUDES . 'header_tags.php'); 
} else { 
?> 
 <title><?php echo TITLE ?></title> 
<?php 
} 
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?> 
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> 
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</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"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
	  <?php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {?> 
	   <td><h1><?php echo HEADING_TITLE; ?></h1></td>
	  <?php } else { ?>		   
	   <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
	  <?php } ?>
	   <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	 </tr>
	 <tr>
	   <td class="main"><?php echo HEADING_SUB_TEXT; ?></td>
	 </tr>		   
	 <tr>
	  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	 </tr>
   </table></td>
 </tr>
 <tr>
   <td align="center" class="smallText"><?php $firstletter_nav=
	'<a href="' . tep_href_link("allprods.php",  'fl=A', 'NONSSL') . '"> A |</A>' . 
	'<a href="' . tep_href_link("allprods.php",  'fl=B', 'NONSSL') . '"> B |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=C', 'NONSSL') . '"> C |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=D', 'NONSSL') . '"> D |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=E', 'NONSSL') . '"> E |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=F', 'NONSSL') . '"> F |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=G', 'NONSSL') . '"> G |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=H', 'NONSSL') . '"> H |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=I', 'NONSSL') . '"> I |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=J', 'NONSSL') . '"> J |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=K', 'NONSSL') . '"> K |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=L', 'NONSSL') . '"> L |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=M', 'NONSSL') . '"> M |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=N', 'NONSSL') . '"> N |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=O', 'NONSSL') . '"> O |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=P', 'NONSSL') . '"> P |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=Q', 'NONSSL') . '"> Q |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=R', 'NONSSL') . '"> R |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=S', 'NONSSL') . '"> S |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=T', 'NONSSL') . '"> T |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=U', 'NONSSL') . '"> U |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=V', 'NONSSL') . '"> V |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=W', 'NONSSL') . '"> W |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=X', 'NONSSL') . '"> X |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=Y', 'NONSSL') . '"> Y |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=Z', 'NONSSL') . '"> Z</A>  '   .
	'<a href="' . tep_href_link("allprods.php",  '',	 'NONSSL') . '">'. HEADING_TITLE .'</A>';

	echo $firstletter_nav; ?></td>
 </tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
 <tr>
   <td>
<?php
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
				  'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
				  'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 
				  'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
				  'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
				  'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
				  'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
				  'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
asort($define_list);

$column_list = array();
reset($define_list);
while (list($column, $value) = each($define_list)) {
  if ($value) $column_list[] = $column; 
}

$select_column_list = '';

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_NAME') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) {
 continue;
  }
}

// listing all products
$listing_sql = "select p.products_id, products_weight, p.products_quantity, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id  $where order by p.products_sort_order";

if (ALL_PRODUCTS_DISPLAY_MODE == 'true')
include(DIR_WS_MODULES . 'product_listing.php'); //display in standard format
else
include(DIR_WS_MODULES . 'allprods.php');
?>
   </td>
 </tr>
  </table></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'); ?>

 

 

Thanks!

Link to comment
Share on other sites

I couldn't find an All Products support forum, so I was hoping you guys could help me here. :)

 

The problem I am having is when going to the allprods.php page instead of showing all the products I get this:

I have ran the allprods.sql in phpMyAdmin...

 

Any ideas of why it might be doing this?

 

I have Ultimate SEO urls installed could this be it?

Any help appreciated!

If that is what is actually displaying, then it is displaying code, not an error. That would generally indicate a mistake in the code. But unless you edited that file, that shouldn't happen.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If that is what is actually displaying, then it is displaying code, not an error. That would generally indicate a mistake in the code. But unless you edited that file, that shouldn't happen.

 

Jack

 

That is why I am so baffled... The code is unaltered from the original in the contribution, I've even tried to upload older versions of this file hoping that would fix it, but no change.... Hmmmmm...

Edited by pulp2
Link to comment
Share on other sites

Try looking in this area.

 

$listing_sql = "select p.products_id, products_weight,

 

Enjoy

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Try looking in this area.

 

$listing_sql = "select p.products_id, products_weight,

 

Enjoy

 

I really appreciate the help! Sorry still new at this debugging stuff...

 

It turns out there was an extra table "p.products_sort_order" in the line you pointed me too. I took that out and now it works.

 

Thanks again!

Link to comment
Share on other sites

And there was me thinking it was

 

$listing_sql = "select p.products_id, products_weight,

 

should read

 

$listing_sql = "select p.products_id, p.products_weight,

 

FYI

 

p.products_sort_order

 

means the field products_sort_order in the products table

 

products table is define by

 

from " . TABLE_PRODUCTS . " p

 

note the p following it

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

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