Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF Catalog and MySQL 5


steve01

Recommended Posts

Hello together,

 

if I install the contribution PDF Catalog, I became the follow warning message in the adminarea:

 

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

select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, 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, products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '2' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id='55' order by pd.products_name, p.products_date_added DESC

 

The follow query must be edit in pdf_catalogue.php in admin/:

			$requete_prod="select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id='".$current_category_id."' order by pd.products_name, p.products_date_added DESC";

 

Can You help me?

Link to comment
Share on other sites

yea try:

 

$requete_prod="select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, 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, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = s.products_id and p.manufacturers_id = m.manufacturers_id and products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id='".$current_category_id."' order by pd.products_name, p.products_date_added DESC";

Link to comment
Share on other sites

the query should work there were no changes in terms of its result. From what I see it takes into account the current category you're in so it will only return the products under the current category and not all products. To return all products remove the

 

 and p2c.categories_id='".$current_category_id."'

Link to comment
Share on other sites

  • 3 weeks later...

I get the 1. error gone with the code.

 

Nut now i get this error -

Fatal error: Cannot access empty property in C:\Apache2\htdocs\domain\Webshop15\admin\pdf_catalogue.php on line 621

 

Line 621 - $this->$parent_category_name='';

Line 622 - $this->ParentsName($current_category_level,$i,$categorieslevelsarray, $categoriesnamearray);

 

Someone please help me

 

//TheExterminator

Link to comment
Share on other sites

I have an easy solution .. and I am not being cocky.

 

Just stick to SQL 4.x versions until all the problems with 5.x versions are worked out.

 

But All Other page work fine, and i have not get the error before in mysql 5.

And is not a sql error i have probs. whit.

Link to comment
Share on other sites

the query should work there were no changes in terms of its result. From what I see it takes into account the current category you're in so it will only return the products under the current category and not all products. To return all products remove the

 

 and p2c.categories_id='".$current_category_id."'

 

enigma1 >> Will You Please Take A Look Here : http://the-exterminator.dk/webshop15/catal...s/catalog_2.pdf

And Tell Me What Wrong With It, And How I Can Make It.

 

//TheExterminator

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...