Guest Posted December 26, 2002 Share Posted December 26, 2002 Hi David, Sorry I didn't get back to you sooner...had family obligations yesterday. I'm afraid I don't have an answer why you are getting that error. Which version are you using? Have you uninstalled the mod and tried re-installing it? Quote Link to comment Share on other sites More sharing options...
davidturetsky Posted December 27, 2002 Share Posted December 27, 2002 I will try re-installing. Thanks. :D Quote Link to comment Share on other sites More sharing options...
saigonhoa Posted December 30, 2002 Share Posted December 30, 2002 Hi all, First of all, let me say this contribution is great. However, the printable catalog prints out the duplicate products serveral times depend on how many attribute options I have added to that product. I think this is the problem with most of stores in which each product has several options added to itself. For example : Product A has some attribute options like: Color = red (+ USD 2.00 ) yellow (+ USD 2.00 ) blue (+ USD 2.00 ) Somehow the product table in database understands there are three different products ( actually only one Product A ) So, if I have only 40 actual products ( with pictures and descriptions ) and I have 4 attribute options for each product, the Printable Catalog will print out 160 products. There are 4 duplicate for each product. Any ideas and suggestions how to get rid of duplicate ones. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2002 Share Posted December 30, 2002 Hi Wayne, Hhhhmmm.....I just double checked my printable catalog and the products I have that have attributes are not duplicated but, I don't have an upcharge either. I haven't worked on adding the attributes to the catalog yet either. I'm going to have to think about this one a bit.... Question...Do all of your products have an upcharge associated with the attribute like your example? Product A has some attribute options like:Color = red (+ USD 2.00 ) yellow (+ USD 2.00 ) blue (+ USD 2.00 ) Quote Link to comment Share on other sites More sharing options...
thewitt Posted December 30, 2002 Share Posted December 30, 2002 In looking over the SQL query, I don't think this is possible today. You will have a product printed for each time it's in a new catetory, but there is nothing in the catalog query that even cares about attributes. If you are getting duplicates based on attributes, you are running something other than BirdBrain's contribution. -t Quote Link to comment Share on other sites More sharing options...
saigonhoa Posted December 30, 2002 Share Posted December 30, 2002 Sorry for making any confusion :wink: . I have checked again and found out that I had double prints of each product in the Printable Catalog. So, what I say about duplicate prints based on attributes in incorrect. I should have been more careful about what I said. Any ideas about double prints. :-) I am sure about what I said this time. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2002 Share Posted December 30, 2002 Do you have each of your products in more than one category? Quote Link to comment Share on other sites More sharing options...
saigonhoa Posted December 30, 2002 Share Posted December 30, 2002 Hi Kim, Yes, I have some products in more than one category. Let's say about 10 out of 40 products are in more than one category. The printable catalog prints out 80 products. Any ideas or suggestions. Wayne Quote Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2002 Share Posted December 30, 2002 Those products that are in multiple categories are going to be shown more than once because of the way the query is written. Do you have any other contributions installed? Have you modified the tables in the dB? How 'bout a URL where I can see exactly what it's doing? Quote Link to comment Share on other sites More sharing options...
saigonhoa Posted December 30, 2002 Share Posted December 30, 2002 Hi Kim, Besides doing some customizations, I have not installed any major contributions. I did sort products by price in each category by following some suggestions in forum. In header.php, add the following lines <? php if(!isset ($HTP_GET_VARS['sort'])) { $HTTP_GET_VARS['sort']='4a'; } ?> In the product DB, I only changed the dates of products added. That's all I did. This is the link: http://www.e-saigonflowers.com/catalog/pri...int_catalog.php Quote Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2002 Share Posted December 30, 2002 Wayne, The catalog looks great...except for the duplication....:-) I'm stumped.... Quote Link to comment Share on other sites More sharing options...
Guest Posted January 3, 2003 Share Posted January 3, 2003 Wayne, The catalog looks great...except for the duplication....:-) I'm stumped.... Well, I'm only half-stumped now....I believe that some of the duplication stems from using multiple languages in the store....I don't know how to fix it though. Any bright ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 6, 2003 Share Posted January 6, 2003 I have the same problem, and it looks to be due to multiple languages... I have 7 of every item, and 7 languages. Unfortunately, I don't know enough PHP to fix it :( Awesome job though, Kim! Violet Quote Link to comment Share on other sites More sharing options...
penge Posted January 20, 2003 Share Posted January 20, 2003 Hi, Just wondering if anyone had solved the duplication problem or had any ideas? The only idea I can think of is I moved some entries from the "root" into a category, could this cause a double entry as if there is a 'ghost' impression in the db? Even though i removed all the sample categories from the default installation and added only four items into the catalog, the printable catalog page says:- "Displaying 1 to 3 (of 18 products)" But after all that, a lovely contrib, wish I could help! Penge Quote Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2003 Share Posted January 20, 2003 Richard, Can you post or PM the URL to me so I can take a look? Quote Link to comment Share on other sites More sharing options...
pbfk Posted April 12, 2003 Share Posted April 12, 2003 Hi ! Kim. Is this module can use at Admin side? I'm trying to use as control inventory purpose. Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2004 Share Posted January 13, 2004 I'm adding this in to a new store and am getting the following error: 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select p.products_id, pd.products_name, pd.products_descrip select count(select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_image, 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, cd.categories_name, m.manufacturers_name from products p left join products_to_categories p2c on p.products_id=p2c.products_id left join categories c on p2c.categories_id=c.categories_id left join categories_description cd on c.parent_id=\'0\' and c.categories_id=cd.categories_id left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = \'1\' left join specials s on p.products_id = s.products_id where products_status = \'1\' order by cd.categories_name, c.parent_id, c.sort_order, c.categories_id, pd.products_name) as total [TEP STOP] which you can see here: http://oddsandinsonline.com/catalog/print_catalog.php Any suggestions where to start looking? Quote Link to comment Share on other sites More sharing options...
defender39 Posted January 13, 2004 Share Posted January 13, 2004 this usually indicates you have a ' somewhere in a title..remove all ' in titles and see if that helps Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2004 Share Posted January 13, 2004 I had one ' in a category title and removed it but no change- any other ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2004 Share Posted January 14, 2004 Still haven't figured it out but am wondering about this piece of code at the end of includes/modules/print_catalog: <!-- model number --> <td > <?php echo TEXT_MODEL . $print_catalog_array[$i]['model']; ?> </td> <!-- added to inventory --> <td > <?php echo TEXT_DATE_ADDED . $print_catalog_array[$i]['date_added']; ?> </td> </tr> <?php if (($i+1) != sizeof($print_catalog_array)) { ?> </table> </td> </tr> <?php } } } ?> </table> Should that closing table be there? Or before ?>? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2004 Share Posted January 18, 2004 anyone get any further with this? I get the same SQL error. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2004 Share Posted January 18, 2004 i used my phpadmin to read the .sql file again now the problem is over Quote Link to comment Share on other sites More sharing options...
Sanguinarius Posted May 15, 2004 Share Posted May 15, 2004 I just installed the mod and I am having the same problem as Quin is. My info is: 1064 - You have an error in your SQL syntax near 'select p.products_id, pd.products_name, pd.products_description, p.products_m' at line 1 select count(select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_image, 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, cd.categories_name, m.manufacturers_name from products p left join products_to_categories p2c on p.products_id=p2c.products_id left join categories c on p2c.categories_id=c.categories_id left join categories_description cd on c.parent_id=\'0\' and c.categories_id=cd.categories_id left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = \'1\' left join specials s on p.products_id = s.products_id where products_status = \'1\' order by cd.categories_name, c.parent_id, c.sort_order, c.categories_id, pd.products_name) as total [TEP STOP] I'm not a php guru, but I am certain I installed everything very very carefully. Any ideas? Quote --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
Sanguinarius Posted May 15, 2004 Share Posted May 15, 2004 Please disregard my above post. I can't edit or delete it. I'm trying a different mod (and having problems with IT now, instead, lol!). Quote --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
OsirisPhnx Posted June 27, 2004 Share Posted June 27, 2004 Has anybody found a solution to the above SQL error? If so how do I fix it. I have just started to update my website and would like to use this contrib, but if I can't find a solution to this problem I may just find another solution for a printable catalog. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.