Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Template install. - 1054 error fixed but now cant find products..?


rickard_l

Recommended Posts

Posted

I have three diffrent stores that I'we tried to install a template fróm a brand new installation of OSC.

 

When I'we replaced the files with the template once and run the installtion i get this message

 

"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 = '23'

 

[TEP STOP]"

 

ok so I'we looked in this forum and got this line that should be replaced

 

// 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 = '" . $languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'";

 

with the following:

 

// 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'] . "'";

 

 

OK done that... PERFEKT the 1054 error dissapears... YIPPIE... or so i thought <_<

 

:blink:

 

OK when I go to the products page and press on the category of e.g hardware (from the org installtion) it show this message

 

"There are no products to list in this category" - seriously this is bad :blink:

 

what can be the error?

 

 

-- -- -- -- in short -- -- -- --

 

- The categories display that there are products underneeth but when pressing a category you get the message. "There are no..."

 

- It's possible to wiev the new products = the product must be working somehow... so might it be between the the categories and fetching the information from the products list?

 

I'we fixed the 1054 error message before and then it gets the message "There are no..."

 

 

 

Please anyone help me.

Posted
what can be the error?

You are talking to wrong people here. Look for people who are better equiped to help you here instead of double posting/cross-posting. Thanks.

Posted
You are talking to wrong people here. Look for people who are better equiped to help you here instead of double posting/cross-posting. Thanks.

 

hm... isnt irony sweet. I'm glad you show you can express it in such funny way =/

 

I just thought that "installation" might actually be the correct place to post this note and that it would be good to give a good background of what has happened / occured,

 

bah... <_<

 

:angry:

Posted
I just thought that "installation" might actually be the correct place to post this note and that it would be good to give a good background of what has happened / occured,

It is but we are not pychics here. How can we know what goes wrong with only the description of the error?

 

Dear car mechanic: my car won't start. How can I fix it?

 

What whould you say?

Posted
It is but we are not pychics here. How can we know what goes wrong with only the description of the error?

 

Dear car mechanic: my car won't start. How can I fix it?

 

What whould you say?

 

darn... I really hoped that you guys would be THAT good :lol:

 

so what would be good to know?

Posted
so what would be good to know?

The actual query. One idea is to make a deliberate error in the query (I guess this is on index.php?) e.g. in a table name and then post it here to see if people can spot an error in it.

 

You could also add Output Queries Debug and copy and paste the query from there.

  • 1 month later...

Archived

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

×
×
  • Create New...