Peter M Posted January 18, 2010 Share Posted January 18, 2010 Hi, I have managed to merge the contributions now myself, although it looks like I havent got it quite right just yet. I have just been testing and have found that if I click on the image of a product in product_listing.php, it tries to open product_info.php I assume, but fails with the following message; Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /homepages/0/d177551101/htdocs/pmashop/includes/functions/database.php on line 151 If I look at the code being refered to in the message it is as follows; function tep_db_num_rows($db_query) { return mysql_num_rows($db_query); } I would appreciate any help anyone can offer. Quote Link to comment Share on other sites More sharing options...
kanata_82 Posted January 18, 2010 Share Posted January 18, 2010 I'vé setted the emulateie7 in my head section but aint working...still the same errors. Quote Link to comment Share on other sites More sharing options...
spooks Posted January 18, 2010 Author Share Posted January 18, 2010 I have installed this mod on my site and spotted a bug. Thats not normal, your bug is an error u have created, try the included file. Did u not wonder your the only one with it? Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted January 18, 2010 Author Share Posted January 18, 2010 I'vé setted the emulateie7 in my head section but aint working...still the same errors. Thats not the STS issue, search a bit more, u must add to your sts files. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Peter M Posted January 18, 2010 Share Posted January 18, 2010 Just to let everyone know, Ive done some more digging and have found the problem, it was a clash with the bundled products contribution. Having made some minor changes to the SQL selections from the products table it all works fine now! Quote Link to comment Share on other sites More sharing options...
fan4chevy Posted January 19, 2010 Share Posted January 19, 2010 (edited) Spooks, Have you ever seen this zoom feature shown in the provided links below? I am wondering if it could be something for this contrib. (scroll over images) http://www.studentmarket.com/Bass-Paris-Lounger-Collection-BSS1532.html Charles Edited January 19, 2010 by fan4chevy Quote Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2010 Share Posted January 22, 2010 (edited) Hello ! first of all, a big thanks to the author of this contribution, and anyone involved in improving it and helping newbie users like me :) I installed multiple image on my website, free from templates and with only easypopulate and paypal add ons at the moment. On the admin side, it looks Okay, ... but then switching on the shop the products are there and displayed in the list of each category or per manufacturer but when clicking to have the full detail for one product, the product is not displayed. I get "Product not found' and these error messages : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/(xxx)/public_html/shop/includes/functions/database.php on line 99 (on top of the page) and Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/(xxx)/public_html/shop/includes/functions/database.php on line 103 I suspect it has to do with the way I installed it... but I don't see where and how... :( . I would greatly appreciate if you could point me in the right direction : in which part of the code is the problem likely to be ? which file ? for info, here is the section of code of the database.php mentioned in the warning messages : From line 99 to 103 function tep_db_fetch_array($db_query) { return mysql_fetch_array($db_query, MYSQL_ASSOC); } function tep_db_num_rows($db_query) { return mysql_num_rows($db_query); Many thanks for your help ! Flo Edited January 22, 2010 by augustinparis Quote Link to comment Share on other sites More sharing options...
spooks Posted January 22, 2010 Author Share Posted January 22, 2010 I've installed this but i now get: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ....... Please read the FAQ!! A.Check you edits again very carefully, you have made errors in the install, try using a file compare tool if you have trouble with the manual method. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Peter M Posted January 22, 2010 Share Posted January 22, 2010 Hi AugustinParis, It looks to me like your error is not actually in the function reported, but in another php file that called the function, most likely with incorrect parameters. In order to fix the problem, we first need to know exactly what it was you were doing when you got the error. For example if you were selecting a category and expecting to see a list of products in that category, then the problem is in the products listing php which is called products_listing.php in the catalog/includes folder. Or perhaps in this case you were clicking on a product from a category, in which case the problem is in the product_info.php file in the catalog/ folder. As spooks said, it is well worthwhile taking the orignial files you saved just before installing this contribution and comparing them with some sort of compare tool to the ones that came in th folder with the downloaded contribution folder. I personally use WinMerge which is a free tool that can be downloaded from the interweb. A great place to start would be to make sure you ran the sql file that was included in the contribution download folder, the sql you should have run is as follows; ALTER TABLE `products` ADD `products_image_array` blob; INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Tiny Image Width', 'TINY_IMAGE_WIDTH', '30', 'Image width for additional image thumbnail', 4, 20, NULL, now(), '', ''); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Tiny Image Height', 'TINY_IMAGE_HEIGHT', '30', 'Image height for additional image thumbnail', 4, 21, NULL, now(), '', ''); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Additional images per row/column', 'TINY_IMAGE_GROUP_SIZE', '3', 'Number of additional images to show per row/column in the product display', 4, 22, NULL, now(), '', ''); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Additional Image Format', 'ADDITIONAL_IMAGE_FORMAT', 'horizontal', 'Show additional image in a vertical or horizontal format', 4, 23, NULL, now(), '', 'tep_cfg_select_option(array(\'horizontal\', \'vertical\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Dim background on popup', 'DIM_BACKGROUND', 'false', 'Dim the background when popup images are shown. (enabled, this option can make the zoom action less smooth).', 4, 24, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Background luminosity', 'BKG_LUMA', '2', 'How much to dim background, if enabled. 1 = min, 9 = max.', 4, 25, NULL, now(), '', 'tep_cfg_select_option(array(\'1\', \'2\',\'3\',\'4\',\'5\',\'6\',\'7\',\'8\',\'9\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Popup images dragable', 'DRAG_POPUP', 'false', 'Enable dragging of popup images.', 4, 26, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Popup \'swing\' effect', 'SWING_POPUP', 'true', 'Add a \'swing\' effect to the opening popup zoom.', 4, 27, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Show popup navigation', 'SHOW_NAV', 'false', 'Always show popup navigation icons, or hide till mouse over.', 4, 28, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Popup navigation position', 'POS_NAV', 'middle', 'Position the popup navigation icons at the top, middle or bottom of images.', 4, 29, NULL, now(), '', 'tep_cfg_select_option(array(\'top\', \'middle\',\'bottom\'),'); Let us know how you get on. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2010 Share Posted January 22, 2010 Hi All and thankyou to the people who have made this contribution work it looks great. Athough everything is working I have seem to have a problem with the size of the pop-up window. Standard image 100 x 80 on the pop-up is shows 82 x 43. It seems to be <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> causing the problem. I know you can change it to one of the others, but this seems to disable one of the other jquery programs I have installed. Please view the problem. Please also excuse the site and check out one of the product pages. It's a test site. http://www.rjavtest.com/ Regards. Shane. Quote Link to comment Share on other sites More sharing options...
carvolution Posted January 22, 2010 Share Posted January 22, 2010 Spooks? Can you help me please? Let me start by stating i know nothing about web designing and i have run into a small problem. I have installed oscommerce ok and uploaded a new templte and then your addon. Now its all working fine, execpt the product information has all been moved to the far right of the page and not in the centre?? Please look at: http://daretoowear.com/shop/product_info.php?products_id=27 Can you advise a web virgin?? Im in need of a walkthrough!! Thanks man! Quote Link to comment Share on other sites More sharing options...
spooks Posted January 23, 2010 Author Share Posted January 23, 2010 Image scaling not exact in ie This has been discussed already in this thread, if your veiwport is small scaling will occur & u may get this, turn off scaling but remember viewport issue, see ealier posts if you need more. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted January 23, 2010 Author Share Posted January 23, 2010 html errors sounds like u have basic html errors, fix them, use w3c to validate & help find errors. If you dont understand basic html, try reading a bit http://www.w3schools.com/html/default.asp Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Amigoo Posted January 23, 2010 Share Posted January 23, 2010 Hello Sam, 3 days ago I asked you about a solution for this error message. Warning: trim() expects parameter 1 to be string, array given in D:\xampp\htdocs\php530_22rc2a\catalog\admin\includes\functions\general.php on line 35 It appear when I go back from Product Preview Page. Until now I could not find the problem. I think it occur because I'm running on my xampp PHP 5.3 .I have changed all deprecated functions on my 22rc2a. On my test server with PHP 5.2.8 I do not have any problems. All is working well. e.g. I have also changed this deprecated ereg_replace() function at admin/categories.php: <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? ereg_replace('& ', '& ', trim(stripslashes($products_description[$languages[$i]['id']]))) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> into this: <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> Hope this was correct. I like these addons :-). Very good work but I think now is time to check these add ons at a clean 22rc2a with PHP5.3 .In march I have more time. I'll try it than. Quote Link to comment Share on other sites More sharing options...
Amigoo Posted January 25, 2010 Share Posted January 25, 2010 (edited) I think to remember that I have read something about - what I have to change at the code when a product description disappear. Anybody knows where it is? I'm searching now more than 3h without luck. :-( Thanks for help. Edited January 25, 2010 by Amigoo Quote Link to comment Share on other sites More sharing options...
Amigoo Posted January 25, 2010 Share Posted January 25, 2010 Finally I found the thread: Skip preview Quote Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2010 Share Posted January 25, 2010 Hi Sam, I have a conflict with Extra Product Fields and Simple Multi Image Add-On and I am receiving these errors: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in *****/includes/functions/database.php on line 99 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in *****/includes/functions/database.php on line 103 I used Araxis Merge to combine these two contributions but still can't seem to nail it down. The forum won't allow me to post the code, it doesn't like the length of it. Have you come across any conflicts with these two contributions ?? I am thinking the problem is in one of the shared database queries in the categories.php file. If you can take a quick look at it, I would appreciate it. Chris Quote Link to comment Share on other sites More sharing options...
spooks Posted January 25, 2010 Author Share Posted January 25, 2010 You just need to edit the query correctly, try doing it manually, automatic often gets it wrong. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Peter M Posted January 25, 2010 Share Posted January 25, 2010 Hi Sam, I have a conflict with Extra Product Fields and Simple Multi Image Add-On and I am receiving these errors: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in *****/includes/functions/database.php on line 99 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in *****/includes/functions/database.php on line 103 I used Araxis Merge to combine these two contributions but still can't seem to nail it down. The forum won't allow me to post the code, it doesn't like the length of it. Have you come across any conflicts with these two contributions ?? I am thinking the problem is in one of the shared database queries in the categories.php file. If you can take a quick look at it, I would appreciate it. Chris Hi Chris, I am running this contribution quite happliy with several others, one of which is Extra Product Fields v1.2. A full list of the other contributions I have is as follows; Add Button Back v1.3 Bundled Products v1.6 Category and Products in Title Bar Customer Extra Fields Extended v1.3 - Currently has a Clash in Extra Fields Manager with Extra Product Fields, needs sorting! Extra Product Fields v1.2 Get 1 Free v1.4.1 OSCThumb Option Types v2.1.3 Phone Payment Module Product Availability v1.03 Simple Multiple Images Unlimited (With fancy Popups) - This contribution Simply Hide Products v1.1 Store Pickup v1.4 As you can see, the list of contributions I have is fairly substantial, I have found some contributions a little difficult to merge simply by following the instructions in each one. The main issue seems to be the various SQL statements which have had fields added and changed in the various contributions. If you would like a copy of any of my .php files to compare to your own, please do pm me an email address an I'll email them over to you. Best of luck! Pete. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2010 Share Posted January 25, 2010 Hello Peter, I do appreciate the offer. This contribution and Extra Products Fields are the only two installed on this cart so far so I will have to look at it closer. I have a feeling this is the culprit but will have to see which value extra product fields is looking for. tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_image_array, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_array']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); Thank you again for your reply. Chris Quote Link to comment Share on other sites More sharing options...
Amigoo Posted January 25, 2010 Share Posted January 25, 2010 The addon is running well on my server. Only a similar problem I have when I make a copy from a product. I also have some additional fields in products. 1136 - Column count doesn't match value count at row 1 insert into products (products_quantity, products_model, products_lang, products_os, products_release, products_region, products_amount, products_image, products_image_array, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('10', 'DVD-UNSG2', '', 'Windows', '', '', '', '', '101/101-001_01.jpg', 'a:3:{i:0;s:18:\"101/101-001_02.jpg\";i:1;s:18:\"101/101-001_03.jpg\";i:2;s:18:\"101/101-001_04.jpg\";}', '29.9900', now(), '', '7.00', '0', '0', '3') [TEP STOP] Any opinion from where comes this problem? Quote Link to comment Share on other sites More sharing options...
spooks Posted January 25, 2010 Author Share Posted January 25, 2010 The addon is running well on my server. Only a similar problem I have when I make a copy from a product. I also have some additional fields in products. 1136 - Column count doesn't match value count at row 1 insert into products (products_quantity, products_model, products_lang, products_os, products_release, products_region, products_amount, products_image, products_image_array, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('10', 'DVD-UNSG2', '', 'Windows', '', '', '', '', '101/101-001_01.jpg', 'a:3:{i:0;s:18:\"101/101-001_02.jpg\";i:1;s:18:\"101/101-001_03.jpg\";i:2;s:18:\"101/101-001_04.jpg\";}', '29.9900', now(), '', '7.00', '0', '0', '3') [TEP STOP] Any opinion from where comes this problem? check your edits, you made an error somewhere, check around product update/insert Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Peter M Posted January 25, 2010 Share Posted January 25, 2010 Hello Peter, I do appreciate the offer. This contribution and Extra Products Fields are the only two installed on this cart so far so I will have to look at it closer. I have a feeling this is the culprit but will have to see which value extra product fields is looking for. tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_image_array, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_array']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); Thank you again for your reply. Chris Hi Chris, I assume this sql is from catalog/admin/categories.php, in which case this is my sql statement from the copy as == duplicate section of the code; tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_image_array, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_availability_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_array']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); Aside from an extra field in the shape of products_availability_id, there doesn't seem to be that much difference in the two. I wonder therefore, if it might be something to do with the database update sql code that came with either this contribution or the Extra Product Fields one? Pete. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 26, 2010 Share Posted January 26, 2010 Many thanks for your reply ! the mistake was in product info, when I updated the file. It's all working well now, and I am now proficient (or as best as I can be) on winmerge. thanks folks.... and promise, next time, I read the FAQ ;) Quote Link to comment Share on other sites More sharing options...
Toorqs Posted January 26, 2010 Share Posted January 26, 2010 Hello, Im trying to run the SQL info in phpmyadmin for a new install, i assume i should use SQL v.1.1? However i get an error: SQL-spørring: ALTER TABLE `products` ADD `products_image_array` VARCHAR( 800 ) NULL DEFAULT NULL ; MySQL said: #1060 - Duplicate column name 'products_image_array' I cant seem to find any other entries like this one, but im really green with SQL.. Anyone able to point me in the right direction? 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.