Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem In Main Page


umarrana

Recommended Posts

Posted

hello dear i have a big problem in my oscommerce mainpage i installed os but i opne homepage whan i clik on any cata this errors coms

 

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 = '19'

 

ples tell me

Posted
hello dear i have a big problem in my oscommerce mainpage i installed os but i opne homepage whan i clik on any cata this errors coms

 

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 = '19'

 

ples tell me

check out this topic

http://www.oscommerce.com/forums/index.php?sho...304&hl=1054

 

i have fixed index.php and advanced_search_results.php but still having troubles with manufactures links?

 

First, open "index.php" in an html editor and do this:

 

 

QUOTE

1. If you have searched and replaced all the p.products_id = s.products_id with p2c.products_id = s.products_id and are getting the error: 1054 - Unknown column 'p2c.products_id' in 'on clause' then look for the line (NOTE: there are two lines starting with //We show them all comment you want the first one.)

 

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

 

and change it to:

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

 

2. If you are getting 1054 - Unknown column 'p.products_id' in 'on clause' then replace p.products_id = s.products_id with p2c.products_id = s.products_id EXCEPT on the line specified in #1 above.

 

 

Then open "advanced_search_results.php" in an html editor and do this:

 

 

QUOTE

 

I change this code:

$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";

 

with:

$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";

thanks to "Tina Thorpe"

  • 4 weeks later...
Posted
check out this topic

http://www.oscommerce.com/forums/index.php?sho...304&hl=1054

 

i have fixed index.php and advanced_search_results.php but still having troubles with manufactures links?

thanks to "Tina Thorpe"

 

I was having the 1054 error problem with my Sub Catagories and made this change. However, it fixed the Sub Catagories but I now have the 1054 error problem with my Top level catagories.

 

Is there a way to fix both?

 

 

Deskdirect

Archived

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

×
×
  • Create New...