sackling Posted September 13, 2011 Share Posted September 13, 2011 Never mind figured it out by moving the delete to only delete if the product categories ==0 like so: if ($product_categories['total'] == '0') { tep_remove_product($product_id); /* Optional Related Products (ORP) */ tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_master = '" . (int)$product_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_slave = '" . (int)$product_id . "'"); //ORP: end } Quote Link to comment Share on other sites More sharing options...
vashichino7 Posted October 15, 2011 Share Posted October 15, 2011 Hey guys; i installed the related products and it works just fine expect when I go to edit a product I get a break stating the following: Warning: reset() [function.reset]: Passed variable is not an array or object in /home/savingsh/public_html/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/savingsh/public_html/admin/includes/classes/object_info.php on line 18 Here is what it says in object_info.php: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ class objectInfo { // class constructor function objectInfo($object_array) { reset($object_array); while (list($key, $value) = each($object_array)) { $this->$key = tep_db_prepare_input($value); } } } ?> Any ideas? Quote Link to comment Share on other sites More sharing options...
vashichino7 Posted October 19, 2011 Share Posted October 19, 2011 Can this mod be used with 2.3.1 ?? Quote Link to comment Share on other sites More sharing options...
discxpress Posted October 20, 2011 Share Posted October 20, 2011 Can this mod be used with 2.3.1 ?? Yes, download it here: http://addons.oscommerce.com/info/8057 Quote Link to comment Share on other sites More sharing options...
discxpress Posted October 20, 2011 Share Posted October 20, 2011 Question. Is it possible to create some extra fields in Easy Populate so relations can be established by spreadsheet? I have a large shop and it would seem easier to locate in excel and match the items. Or better yet match the products to all products in a certain category. I know that option was available in the other cross sell contributions for version 2.2. This is a great contribution and that's my idea for making it greater. If I was good at php I would attempt that feat myself. Thanks for your time. Quote Link to comment Share on other sites More sharing options...
dvharrison Posted January 13, 2012 Share Posted January 13, 2012 Hi I have added Optional related Products on my XAMPP server to a website I plan to upgrade. SO far so good. But I get to Catalog > related products and on the SQL database. And Whether I press the New Install SQL for Version 4 or the Upgrade SQL to Version 4, I get 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 'TYPE=MyISAM' at line 7 CREATE TABLE IF NOT EXISTS `products_related_products` ( `pop_id` int(11) NOT NULL auto_increment, `pop_products_id_master` int(11) NOT NULL default '0', `pop_products_id_slave` int(11) NOT NULL default '0', `pop_order_id` smallint(6) NOT NULL default '0', PRIMARY KEY (`pop_id`) ) TYPE=MyISAM; [TEP STOP] I tried creating the table in SQL, doing it from scratch using the existing one I have. Please could someone shed some light?? Quote Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted January 14, 2012 Share Posted January 14, 2012 Is there a way I can manually add the SQL database? :blink: Quote Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted January 16, 2012 Share Posted January 16, 2012 I have managed to override the SQL issues by changing TYPE=MYISAM; to ENGINE=MyISAM; and that now works. Sadly the product pages do not show. This isn't a new install for me as I had ORP on the old 2.2 site. Please help whats happening?? Quote Debbie Harrison Link to comment Share on other sites More sharing options...
dvharrison Posted January 26, 2012 Share Posted January 26, 2012 I have re-installed and the existing related products now tie up. However, I cannot view from Catalog > Related products, existing products and when I call an individual product, I don't get its record, I am asked to create a New one. Furthermore new ones do not show up. I take it support has dried up on this once great contribution? Thats is a shame. :'( Quote Debbie Harrison Link to comment Share on other sites More sharing options...
gewoon09 Posted February 1, 2012 Share Posted February 1, 2012 Hi, I've installed the contribution, but I cannot get it running. Everything in configuration is visible, no problem, but when I click catalogue>related products, I see this 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 'RELATED_PRODUCTS_MAX_ROW_LISTS_OPTIONS' at line 8 SELECT pa.* FROM products_related_products pa LEFT JOIN products_description pd ON pa.pop_products_id_master = pd.products_id AND pd.language_id = '4' WHERE pd.products_id = '31' ORDER BY pd.products_name, pa.pop_order_id, pa.pop_id LIMIT 0, RELATED_PRODUCTS_MAX_ROW_LISTS_OPTIONS On the live website likewise: 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 'RELATED_PRODUCTS_MAX_DISP' at line 14 SELECT pop_products_id_slave, products_name, products_model, products_price, products_quantity, products_tax_class_id, products_image FROM products_related_products, products_description pa, products pb WHERE pop_products_id_slave = pa.products_id AND pa.products_id = pb.products_id AND language_id = '4' AND pop_products_id_master = '31' AND products_status='1' ORDER BY rand() limit RELATED_PRODUCTS_MAX_DISP In this thread, someone else had this problem, but didn't share the answer when fixed. Can anyone help me out? I have installed the osc 2.2 version. Thank you! Michiel Quote Link to comment Share on other sites More sharing options...
Guest Posted February 7, 2012 Share Posted February 7, 2012 Hello, Sorry for my bad English. I added the contribution "Related products" tailored to Cso 2.3.1 I have the admin configuration menu (Related products). I have the category menu BOX_CATALOG_CATEGORIES_RELATED-PRODUCTS that installs configuration menu (Related products). And now what do I do? I see nothing in the various menus (products, product attributes, etc.) for create relationships between products. Can someone enlighten me please. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 8, 2012 Share Posted February 8, 2012 For clarity, when I'm on a product, I should have a button "Add related products" next to the other buttons: "modify", "delete", "move" and "copy". But i have an new button entitled him "IMAGE_RELATED_PRODUCTS" and when i clic he going to the screen Utility installation / uninstall SQL tables (HEADING_TITLE_ORP), whereas previously I installed the SQL. Strange ! Quote Link to comment Share on other sites More sharing options...
ShaGGy Posted February 22, 2012 Share Posted February 22, 2012 Can anyone point me to what changes need making to get it to write the products_model in the db instead of the product_id ? I can see its $products_id_master &$products_id_slave but cannot see where product_id is assigned to these ? Quote Link to comment Share on other sites More sharing options...
dvharrison Posted March 2, 2012 Share Posted March 2, 2012 Hi all, I have added this to my live site, but as you can see from http://www.kelscrafts.co.uk/product_info.php?products_id=858 The related products are nowhere to be seen. I have gone through the changes and uploads with a fine tooth comb. Please could anyone help me please?? Also on the admin section, the page links do not work the url (eg page 15) appear but not the actual content of page 15. Please can anyone advise? TIA Quote Debbie Harrison Link to comment Share on other sites More sharing options...
GMcSwegan Posted March 30, 2012 Share Posted March 30, 2012 I was wondering if it there is a simple fix to output the related products into a carousel rather into a table? Thanks in advance Quote Link to comment Share on other sites More sharing options...
Brainbug125 Posted April 23, 2012 Share Posted April 23, 2012 Hi all!!! Great contribution, works fine but I have just one problem, hoping someone could help me to get it through. I can't get appear the right price on products which have a special or discount price. Same problem here :( I just testing Xsell too... I found that this contrib (Related Products) is more flexible but...but... what about prices? Xsell Displays Correctly... Do u have a solution? Quote My Add On for the Osc Community MMB-Manager (Modules,Menu,Boxes Manager) V. 1.0 for 2.31 Link to comment Share on other sites More sharing options...
Brainbug125 Posted April 23, 2012 Share Posted April 23, 2012 Opsss...problem was in xsell and not in this contribution.... Xsell still kept an old Special product in cache. Now Price is displaying correctly Need to test more tought Quote My Add On for the Osc Community MMB-Manager (Modules,Menu,Boxes Manager) V. 1.0 for 2.31 Link to comment Share on other sites More sharing options...
huumm Posted May 31, 2012 Share Posted May 31, 2012 Me too. Anyone knows if we can add related products into Easy Populate ? Question. Is it possible to create some extra fields in Easy Populate so relations can be established by spreadsheet? I have a large shop and it would seem easier to locate in excel and match the items. Or better yet match the products to all products in a certain category. I know that option was available in the other cross sell contributions for version 2.2. This is a great contribution and that's my idea for making it greater. If I was good at php I would attempt that feat myself. Thanks for your time. Quote Link to comment Share on other sites More sharing options...
Flotec Posted September 20, 2012 Share Posted September 20, 2012 I have installed Vers 4.0 of this contribution in an Oscommerce 2.3.3 shop. Everything works great except that related products are shown without being included in a box on product_info page. I did not expect the box being exactly like the 2.3.3 "also purshaced" box but I had expected some sort of box around the related products. I suppose this has something to do with includes/modules/optional_related_products.php but I have just uploaded the included file. Anyone has an idea what could be wrong? Quote Link to comment Share on other sites More sharing options...
Flotec Posted September 21, 2012 Share Posted September 21, 2012 I have looked at the includes/modules/optional_related_products.php file and it does not contain code for info_box_content like it was used for 2.2 oscommerce or "div class="ui-widget infoBoxContainer" like it should be for 2.3.1. Anyone has a proper optional_related_products.php that I can use to get the related products included in a box? I use the latest Related Products Add-on http://addons.oscommerce.com/info/8057 Quote Link to comment Share on other sites More sharing options...
vashichino7 Posted October 30, 2012 Share Posted October 30, 2012 Hey guys! Do you guys know of a feeder/module that will automatically cross-related products together with other products? I want it to automatically add 3+ products to the products, when one sells another gets replaced. Can this work? Please let me know. Quote Link to comment Share on other sites More sharing options...
rqualls Posted March 10, 2013 Share Posted March 10, 2013 I know this addon is probably old and outdated since 2007, but I installed it and seems to be ok with adding new related products in admin. but not getting any hits on the database in the optional_related_products.php sql query. So the section does not show even though I know the database contains the corrected data. Below is the query. $attributes = " SELECT pop_products_id_slave, products_name, products_model, products_price, products_quantity, products_tax_class_id, products_image FROM " . TABLE_PRODUCTS_RELATED_PRODUCTS . ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, ". TABLE_PRODUCTS . " p WHERE pop_products_id_slave = p.products_id AND pd.products_id = p.products_id AND language_id = '" . (int)$languages_id . "' AND pop_products_id_master = '".$HTTP_GET_VARS['products_id']."' AND products_status='1' " . $orderBy; $attribute_query = tep_db_query($attributes); if (tep_db_num_rows($attribute_query)>0) { $count = 0; ?> Thanks if anyone can help.. Quote Link to comment Share on other sites More sharing options...
rqualls Posted March 12, 2013 Share Posted March 12, 2013 Topic Closed... Thanks Quote Link to comment Share on other sites More sharing options...
jhande Posted August 19, 2013 Share Posted August 19, 2013 Is this contribution osC 2.3.3 friendly? Quote - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
dculley Posted September 9, 2013 Share Posted September 9, 2013 My site is heavily modified. I just had to issues to pass along after installing this update of 2.3.3.2. Addon module: Related products. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /includes/modules/optional_related_products.php on line 42 Reads: if (mysql_num_rows($attribute_query)>0) Changed mysql to tep_db_ “Add-Ons that use the mysql_* or mysqli_* functions should use the tep_db_* functions instead. It's an easy update to perform and as Gary stated, conforms to the osCommerce standards.” 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.