Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Installing a Template


RFunk82

Recommended Posts

Hi, I'm new to Os commerce, so far the system is great, I just had one problem, I got some templates and when I install them and try to use it I always get the same error message, When I try to go to "Categories" I get this:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '63'

 

any help please?

 

thank you guys! :thumbsup:

Link to comment
Share on other sites

Hi, I'm new to Os commerce, so far the system is great, I just had one problem, I got some templates and when I install them and try to use it I always get the same error message, When I try to go to "Categories" I get this:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '63'

 

any help please?

 

thank you guys! :thumbsup:

 

try changing

 

p.products_id

 

to this

 

p2c.products_id

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

try changing

 

p.products_id

 

to this

 

p2c.products_id

 

Where can I find this? SQL Tables? which table?

 

I did a search in all tables for "p.products_id" and it didnt find anything.

 

I'm sorry, I'm kinda new to this, thank you.

Link to comment
Share on other sites

Hi, I'm new to Os commerce, so far the system is great, I just had one problem, I got some templates and when I install them and try to use it I always get the same error message, When I try to go to "Categories" I get this:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '63'

 

any help please?

 

thank you guys! :thumbsup:

 

in red above

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

in red above

 

I dont know where to find this.

 

Is it a sql table? (I didnt find it there)

 

Is it a colum inside a table? (Also couldn't find it there)

 

is it in sql or somewhere else?

 

thanks for the help crash!

Link to comment
Share on other sites

You can find it in:

 

catalog/index.php

 

do a search for

p.products_id = s.products_id

and replace with

p2c.products_id = s.products_id

 

Had this same problem 10 minutes ago and it solved it for me.

 

There are 4 instances in the file.

 

Many Thanks

D4

Link to comment
Share on other sites

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and >>>p.products_id<<< = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '63'

 

you will find it in index.php

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

You can find it in:

 

catalog/index.php

 

do a search for

p.products_id = s.products_id

and replace with

p2c.products_id = s.products_id

 

Had this same problem 10 minutes ago and it solved it for me.

 

There are 4 instances in the file.

 

Many Thanks

D4

 

 

Thats what I need. Thank you. Thank you!

Link to comment
Share on other sites

Thing is i'm still getting a similar issue when you try and search for something:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%broom%' or p.products_model like '%broom%' or m.manufacturers_name like '%broom%') )

 

[TEP STOP]

 

Any fresh ideas?

Link to comment
Share on other sites

Thing is i'm still getting a similar issue when you try and search for something:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%broom%' or p.products_model like '%broom%' or m.manufacturers_name like '%broom%') )

 

[TEP STOP]

 

Any fresh ideas?

 

Try the same in advanced_search.php

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Thanks

 

Here it is:

 

<?php
/*
 $Id: advanced_search.php,v 1.50 2003/06/05 23:25:46 hpdl Exp $

 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_ADVANCED_SEARCH);

 $breadcrumb->add(NAvb script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td>
		<td class="smallText" align="right"><?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?></td>
	  </tr>
	</table></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 class="fieldKey"><?php echo ENTRY_CATEGORIES; ?></td>
			<td class="fieldValue"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); ?></td>
		  </tr>
		  <tr>
			<td class="fieldKey"> </td>
			<td class="smallText"><?php echo tep_draw_checkbox_field('inc_subcat', '1', true) . ' ' . ENTRY_INCLUDE_SUBCATEGORIES; ?></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td class="fieldKey"><?php echo ENTRY_MANUFACTURERS; ?></td>
			<td class="fieldValue"><?php echo tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td class="fieldKey"><?php echo ENTRY_PRICE_FROM; ?></td>
			<td class="fieldValue"><?php echo tep_draw_input_field('pfrom'); ?></td>
		  </tr>
		  <tr>
			<td class="fieldKey"><?php echo ENTRY_PRICE_TO; ?></td>
			<td class="fieldValue"><?php echo tep_draw_input_field('pto'); ?></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td class="fieldKey"><?php echo ENTRY_DATE_FROM; ?></td>
			<td class="fieldValue"><?php echo tep_draw_input_field('dfrom', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"'); ?></td>
		  </tr>
		  <tr>
			<td class="fieldKey"><?php echo ENTRY_DATE_TO; ?></td>
			<td class="fieldValue"><?php echo tep_draw_input_field('dto', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

OK If you are having trouble with this one

 

locate this

 

$from_str = "from ((" . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";

 

and change it for this

 

$from_str = "from (((" . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c)";

 

hope that helps

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...