Guest Posted August 15, 2003 Share Posted August 15, 2003 Matti- I wanted to ask you.....does you current version allow products to be in more than one family? Thanks, -Chris No it does not - that is something I have considered - I think it would be useful for many people. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2003 Share Posted August 16, 2003 After I install this contribuition, I'm receiving errors. I added a product that has attributes, so it goes to page "What's In My Cart?" but when I click in the image or in the link to see the description of the product, show te error below: 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 '{1}1' at line 1 select products_family from products where products_id = 1{1}1 [TEP STOP] What can I do to correct this problem? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2003 Share Posted August 16, 2003 What can I do to correct this problem? Ok - you have found a bug :? Here is the fix 8) In product_info.php replace: $currentid = $HTTP_GET_VARS['products_id']; $family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = " . $currentid . ""); with: $family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); ....and in family_products.php from line 19 replace: $currentid = $HTTP_GET_VARS['products_id']; $family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = " . $currentid); with: $family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); and on line 66 replace: $family_sql = "select p.products_id, p.manufacturers_id, p.products_model, p.products_image, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, s.status, p.products_price, p.products_family, m.manufacturers_name 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_id = pd.products_id and p.products_family = '" . $thisquery['products_family'] . "' and p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'"; with: $family_sql = "select p.products_id, p.manufacturers_id, p.products_model, p.products_image, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, s.status, p.products_price, p.products_family, m.manufacturers_name 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_id !=" . (int)$HTTP_GET_VARS['products_id'] . " and p.products_id = pd.products_id and p.products_family = '" . $thisquery['products_family'] . "' and p.manufacturers_id = m.manufacturers_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'"; I will update the contribution files today :wink: Quote Link to comment Share on other sites More sharing options...
Guest Posted August 17, 2003 Share Posted August 17, 2003 The contribution files have been updated - correcting a bug when viewing products from the shopping cart back to product_info.php. Please update your installations. The files may be downloaded here: http://www.oscommerce.com/community/contributions,1429 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 17, 2003 Share Posted August 17, 2003 Thanks, now is perfect. Did you that the prase: Displaying 1 to 1 (of 1 products) Result Pages: 1 display twice in the product info? Family Products: Displaying 1 to 1 (of 1 products) Result Pages: 1 Model Product Name+ Price Buy Now MG400-32MB Matrox G400 32MB $499.99 Displaying 1 to 1 (of 1 products) Result Pages: 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 17, 2003 Share Posted August 17, 2003 Thanks, now is perfect. Did you that the prase: Displaying 1 to 1 (of 1 products) Result Pages: 1 display twice in the product info? Family Products: Displaying 1 to 1 (of 1 products) Result Pages: 1 Model Product Name+ Price Buy Now MG400-32MB Matrox G400 32MB $499.99 Displaying 1 to 1 (of 1 products) Result Pages: 1 You can configure it in admin>configuration>Family Products>Location of Previous/Next Navigation Bar - set it to 1 to display it at the top, 2 at the bottom, and 3 for both Quote Link to comment Share on other sites More sharing options...
Guest Posted August 17, 2003 Share Posted August 17, 2003 You can configure it in admin>configuration>Family Products>Location of Previous/Next Navigation Bar - set it to 1 to display it at the top, 2 at the bottom, and 3 for both Thank you :D Quote Link to comment Share on other sites More sharing options...
moosaic Posted August 19, 2003 Share Posted August 19, 2003 It seems that the "TEXT_NO_PRODUCTS" issue has not been solved yet. As previously mentionned by others, I do not see the familiy listing in the product_info.php page... Please HELP (MS2) Quote Link to comment Share on other sites More sharing options...
kepa Posted August 22, 2003 Share Posted August 22, 2003 Please post your findings if you fix it and I'll do the same too... Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted August 22, 2003 Share Posted August 22, 2003 It seems that the "TEXT_NO_PRODUCTS" issue has not been solved yet. As previously mentionned by others, I do not see the familiy listing in the product_info.php page... Please HELP (MS2) Are you using the latest updated files? Please make sure that your installation has the trans_sid settings found the .htaccess file in the package Quote Link to comment Share on other sites More sharing options...
kepa Posted August 22, 2003 Share Posted August 22, 2003 and I am still getting the problem. I don't understand, there's not a lot of code to pour over and yet I can't find any discrepencies. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 22, 2003 Share Posted August 22, 2003 and I am still getting the problem. I don't understand, there's not a lot of code to pour over and yet I can't find any discrepencies. There is a bit of redundant code that *should* be passed over when parsed, but in some installations there seems to be a problem. I will update the files this weekend, removing any excess fat and see if this may help. Aezalpha has in fact solved the problem, but has not posted the solution as yet. Quote Link to comment Share on other sites More sharing options...
moosaic Posted August 22, 2003 Share Posted August 22, 2003 OS MS2 from July 2003 I have installed Family Products Update2 I do have the .htaccess mentionned -> still have the TEXT_NO_PRODUCT mentionned I have tried a lot of things : - changing the script position in the product_info.php page - reduced the number of search results from 20 to 2 - changed the family name as a category name - checked that it was inserted in my DB - ... -> still have the TEXT_NO_PRODUCT mentionned I believe that a lot of us share the same problem issue. Any fix ? Quote Link to comment Share on other sites More sharing options...
aezalpha Posted August 22, 2003 Share Posted August 22, 2003 Hi peeps, I'm not sure if I have a solid solution to the TEXT_NO_PRODUCTS problem. I had some time one night and decided to look further into the problem. I suspect that it might have been the order of the things that were installed. For the initial setup, I did things in this order: 1. Installed MS2 2. Installed Family Products mod 3. Added sample products 4. Added Traditional Chinese mod At some point osC must have gotten confused, and gave me the TEXT_NO_PRODUCTS error. Anyway, when I went back to look at it after Matti made his lastest updates, I went through each file and did a "diff" to manually go through it to see what was updated. Here's what I did... 1. Uploaded new files and renamed them 2. Cross-checked new SQL file and fields from last install...no changes. 3. Did "diff" on old and new PHP files. Put in new updates. Took out some "^M" that snuck into some of the files. 4. Tested and Family Products didn't work with original sample products. 5. Deleted original family and original sample products. 6. Added new sample products and new family. 7. Attached new sample products to new family. 8. The mod magically worked! :) So, like I said, I don't have any solid fix for the problem (I didn't change any important code in any of the files). But maybe this would help in giving a little direction. :D Feel free to post or send me a PM if you're still stuck...I'll try to help the best I can. Thanks, aezalpha Quote Link to comment Share on other sites More sharing options...
kepa Posted August 22, 2003 Share Posted August 22, 2003 thanks Quote Link to comment Share on other sites More sharing options...
kepa Posted August 22, 2003 Share Posted August 22, 2003 I have found that $family_sql in catalog/includes/modules/family_products.php needs to be modified to fit your business. I don't use the manufacturer's fields or any references to it because it's not important for what I do. Upon taking those out, the query started to work. I believe the problem lies in the manufacturer's data pull, but can't be sure. I stopped trying to figure out what went wrong when it started to work for me. But it definitely is within the following: $family_sql = "select p.products_id, p.manufacturers_id, p.products_model, p.products_image, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, s.status, p.products_price, p.products_family, m.manufacturers_name 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_id !=" . (int)$HTTP_GET_VARS['products_id'] . " and p.products_id = pd.products_id and p.products_family = '" . $thisquery['products_family'] . "' and p.manufacturers_id = m.manufacturers_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'"; Hope this helps isolate the problem. Kepa Quote Link to comment Share on other sites More sharing options...
digerati Posted August 22, 2003 Share Posted August 22, 2003 Thanks Kepa, You are right. the manufacturer's fields are messing up the query. Quote Link to comment Share on other sites More sharing options...
moosaic Posted August 24, 2003 Share Posted August 24, 2003 You're right ! It works now. The manufacturer sql was miessing up the whole query. family_product.php -> just replace the old $family_sql query by : $family_sql = "select p.products_id, p.products_model, p.products_image, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, s.status, p.products_price, p.products_family from ". TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id !=" . (int)$HTTP_GET_VARS['products_id'] . " and p.products_id = pd.products_id and p.products_family = '" . $thisquery['products_family'] . "' and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'"; Thankx again Quote Link to comment Share on other sites More sharing options...
afonseca Posted August 27, 2003 Share Posted August 27, 2003 Hi, Anyone knows why do i get: Family Products: Warning: main(includes/modules/FILENAME_FAMILY_PRODUCTS): failed to open stream: No such file or directory in /home/ss/public_html/product_info.php on line 215 Warning: main(): Failed opening 'includes/modules/FILENAME_FAMILY_PRODUCTS' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ss/public_html/product_info.php on line 215 ?? Thanks in advance Quote Link to comment Share on other sites More sharing options...
TheFinnisher Posted August 27, 2003 Share Posted August 27, 2003 Antonio, You need to specify the: FILENAME_FAMILY_PRODUCTS in your. includes/filenames.php This is what you should add (or upload the file Matti supplied HOWEVER ONLY IN A FRESH INSTALL!) // Family Products define('FILENAME_FAMILY_LISTING', 'family_listing.php'); define('FILENAME_FAMILY_PRODUCTS', 'family_products.php'); // Family Products EOF You can see the relation...PHP doesn't know what file to open unless you specify the definiton. Quote Link to comment Share on other sites More sharing options...
paulm2003 Posted August 27, 2003 Share Posted August 27, 2003 I haven't tried it yet but I will, the idea is great! People will find related products much easyer this way, without having to search all the categories. Thanks Should be incuded in the next version of osC I think! Quote Link to comment Share on other sites More sharing options...
afonseca Posted August 27, 2003 Share Posted August 27, 2003 Hi TheFinisher, Already did that. Nothing changed. Quote Link to comment Share on other sites More sharing options...
afonseca Posted September 1, 2003 Share Posted September 1, 2003 Hi, I solved the previous item. Now i have an error message: Fatal error: Cannot pass parameter 3 by reference in /home/ss/public_html/includes/modules/family_listing.php on line 17 Can anyone help me? I?m not a php expert, and runnig 2.2CVS Regards, Fonseca Quote Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2003 Share Posted September 1, 2003 Hi, I?m not a php expert, and runnig 2.2CVS The contribution is for 2.2 MS-2 CVS is for experts :shock: Quote Link to comment Share on other sites More sharing options...
afonseca Posted September 1, 2003 Share Posted September 1, 2003 Ok, Anyway, if someone can help, i'll apreciate it. Im?m running 2.2CVS because osc dosen?t have a simple upgrade feature that respects all the mods made. Regards, Fonseca 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.