Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new install from templatemonster please help


lucilue2003

Recommended Posts

Posted

Hello,

 

I purchased a template from templatemonster that has osc built in and i'm having a problem. Everytime you click on a category name, I get an sql error.

The thing is that it works fine on a friends server. Same template . Same upload. The only thing that can be different is the mysql version or php version.

 

However, can you please confirm if the sql syntax is correct...

 

Here is what its spitting out when you click on a category.....

 

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

 

Thanks.

 

http://www.wannabuyalaptop.com/index.php?cPath=24

Posted

Here is the code in the index.php page that is generating this problem i believe:

// 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_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_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 = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

Posted

well apply the lastews osc patches.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

Have you tried downloading the latest version of osCommerce from http://www.oscommerce.com/solutions/downloads, opening the mysql file, deleting your database and reupload the new mysql file? Your error is caused by a missing column in your database. Note: the mysql file is located under the install folder and is called oscommerce.sql I assume that your store has no products/customers, if it does you cannout use this method if you do you will loose your data.

Andrew Yuen

osCommerce, Community Team

Posted
Have you tried downloading the latest version of osCommerce from http://www.oscommerce.com/solutions/downloads, opening the mysql file, deleting your database and reupload the new mysql file? Your error is caused by a missing column in your database. Note: the mysql file is located under the install folder and is called oscommerce.sql I assume that your store has no products/customers, if it does you cannout use this method if you do you will loose your data.

I doubt there is a missing column from the database. He uses an old osc version and the host has mysql5x. The fact that the problem came up after the template installation leads me to believe those templates are simply outdated and do not include the osc updates. So you need to follow the manual instructions in the osc archive from the downloads section and update your store as mentioned by satish earlier.

Archived

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

×
×
  • Create New...