motoenvena Posted August 12, 2013 Share Posted August 12, 2013 Hello everyone, I checked the web and there are two particularly slow queries. I point these two queries if you can give me some advice: " Parse Time: 12.822s Current Parse Time: 12.823 s with 459 queries QUERY DEBUG: Array ( [QUERIES] => Array ( [0] => select value from sessions where sesskey = '88d2b2c52b144df681f7b8437b138038' and expiry > '1376319442' [1] => select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from currencies [2] => select languages_id, name, code, image, directory from languages order by sort_order [3] => delete from whos_online where time_last_click < '1376318542' [4] => select count(*) as count from whos_online where session_id = '88d2b2c52b144df681f7b8437b138038' [5] => update whos_online set customer_id = '0', full_name = 'Guest', ip_address = '87.221.28.120', time_last_click = '1376319442', last_page_url = '/' etc etc etc.... [157] => select distinct products_car_make, products_car_model, products_car_year_bof, products_car_year_eof from products_ymm where products_car_make != '' and products_car_model != '' and products_car_year_bof !=0 and products_car_year_eof != 0 order by products_car_make, products_car_model, products_car_year_bof, products_car_year_eof etc etc etc.... [349] => SELECT cd.categories_alt_imagen, p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name FROM products p LEFT JOIN specials s ON p.products_id = s.products_id LEFT JOIN products_description pd ON p.products_id = pd.products_id AND pd.language_id = '3' LEFT JOIN products_to_categories p2c ON p.products_id = p2c.products_id LEFT JOIN categories_description cd ON p2c.categories_id = cd.categories_id LEFT JOIN featured f ON p.products_id = f.products_id WHERE cd.categories_id = p2c.categories_id and cd.language_id = '3' and p.products_status = '1' AND f.status = '1' order by rand(692469238) DESC limit 9 etc etc etc.... ) [TIME] => Array ( [0] => 0.005322 [1] => 0.001707 [2] => 0.002025 [3] => 0.002469 [4] => 0.002716 [5] => 0.003216 etc etc etc.... [157] => 5.927031 etc etc etc.... [349] => 1.116730 ) ) " Quote Link to comment Share on other sites More sharing options...
motoenvena Posted August 14, 2013 Share Posted August 14, 2013 Hello: I found that when refresh the page, the SQL queries running quickly. [157] => 0.033258 etc etc etc.... [349] => 0.019945 This has made me think that the problem may be caused by cookies check when entering the first page. Can this be possible? The reality is that the page refreshes in 3 seconds when initially almost takes 13 to open. Thank you very much for your opinions and advice. Regards, Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted August 14, 2013 Share Posted August 14, 2013 Hi Nacho Not sure what you are seeing but the site is loading very fast in IE and Firefox by me looking from UK See no problem quicker than a few days ago. regards Joli motoenvena 1 Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
motoenvena Posted August 15, 2013 Share Posted August 15, 2013 Hi Nacho Not sure what you are seeing but the site is loading very fast in IE and Firefox by me looking from UK See no problem quicker than a few days ago. regards Joli Sure?? :D It's a relief for me to read your reply. From Google Spain, with Firefox is very slow. I'm afraid that harm me in Google search results because of slow execution times. @@joli1811, thanks for your reply. Quote Link to comment Share on other sites More sharing options...
prochromekc Posted September 19, 2013 Share Posted September 19, 2013 Where are the installation instructions? Only 1 file downloaded, product_info.php. Thanks, Aaron Quote Link to comment Share on other sites More sharing options...
TheAqurian Posted September 22, 2013 Share Posted September 22, 2013 @@DunWeb Will there be an update to work with osc 2.3.3.3? I still get this error after the update: 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 ') and p.products_status = '1' and p.products_id = p2c.products_id and pd.produc' at line 1 select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_id in () and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' [TEP STOP] Quote Link to comment Share on other sites More sharing options...
srtu Posted September 30, 2013 Share Posted September 30, 2013 Hello, which oscommerce version does this addon work on? Ive tried installing it on every version from 2.3.3 - 2.3.3.4 without any good results. This is what it looks like on my fresh 2.3.3.4 installation: http://www.dhsbilservice.se/bilder/IMG01.jpg http://www.dhsbilservice.se/bilder/IMG02.jpg http://www.dhsbilservice.se/bilder/IMG03.jpg http://www.dhsbilservice.se/bilder/IMG04.jpg Thanks in advance // Jonas Quote Link to comment Share on other sites More sharing options...
PupStar Posted September 30, 2013 Share Posted September 30, 2013 Hello, which oscommerce version does this addon work on? Ive tried installing it on every version from 2.3.3 - 2.3.3.4 without any good results. This is what it looks like on my fresh 2.3.3.4 installation: http://www.dhsbilservice.se/bilder/IMG01.jpg http://www.dhsbilservice.se/bilder/IMG02.jpg http://www.dhsbilservice.se/bilder/IMG03.jpg http://www.dhsbilservice.se/bilder/IMG04.jpg Thanks in advance // Jonas apart from a missing language define all the rest looks ok. Quote Link to comment Share on other sites More sharing options...
srtu Posted October 1, 2013 Share Posted October 1, 2013 apart from a missing language define all the rest looks ok. Hmm, then I have to ask you how to use it heh.. Because when I fill out the information when adding a new product, it doesnt get added. Also I the "Use Previous" dropdowns doesnt get filled with any information. And I haven't seen any related errors, non at all for that matter. Maybe I should check out the mysql logs, as there might be a problem inserting the information into the database? Quote Link to comment Share on other sites More sharing options...
Paul_w Posted October 4, 2013 Share Posted October 4, 2013 Hmm, then I have to ask you how to use it heh.. Because when I fill out the information when adding a new product, it doesnt get added. Also I the "Use Previous" dropdowns doesnt get filled with any information. And I haven't seen any related errors, non at all for that matter. Maybe I should check out the mysql logs, as there might be a problem inserting the information into the database? Have you done as per the post linked below? The most current version of osC uses MySQLi, so you have to update all references to mysql_ as explained in the link below...... http://www.oscommerce.com/forums/topic/370902-contribtion-yearmakemodel-for-osc-v23x/page__st__200#entry1677588 Quote Link to comment Share on other sites More sharing options...
srtu Posted December 5, 2013 Share Posted December 5, 2013 (edited) Have you done as per the post linked below? The most current version of osC uses MySQLi, so you have to update all references to mysql_ as explained in the link below...... http://www.oscommerce.com/forums/topic/370902-contribtion-yearmakemodel-for-osc-v23x/page__st__200#entry1677588 Not quite sure what is meant by that, but I'm running PHP 5.3.13 so that fix shouldnt be needed for me it seems? Maybe im doing something wrong during my install? What I do is I copy the files to the catalog folder, then I install it. I added the SQL to the install files so that it creates the table and so forth. Then when the installation is done i install the module under modules>boxes. After this everything should be golden, no? Still facing the same problems as before, so if anyone have any suggestions. Feel free to shime in! Thanks in advance. Nevermind, I resolved it. There was still one occurence of mysql_* in categories.php. Edited December 5, 2013 by srtu Quote Link to comment Share on other sites More sharing options...
srtu Posted December 17, 2013 Share Posted December 17, 2013 Hello again, didn't get the last version to work. Populated the database fine but I couldnt use the drop downs to search for products.. Tried installing everything again and now I'm back to square 1, running OSC 2.3.1 and the latest YMM. I'm running it on WAMP Apache 2.2.22, PHP 5.3.13 and MySQL 5.5.24. It looks as it looked on the SS's I posted before, http://www.dhsbilservice.se/bilder/IMG01.jpg , http://www.dhsbilservice.se/bilder/IMG02.jpg , http://www.dhsbilservice.se/bilder/IMG03.jpg , http://www.dhsbilservice.se/bilder/IMG04.jpg . I've replaced all the mysql_* occurencies with tep_db_* as was suggested, stll no luck. What I do, in this order is. Create the database, install OSC, populate the database with the YMM data, move the YMM files over to OSC, install the box from modules >> boxes. After that it looks like on the SS's, and I can't populate the database. I saw that there was a new step in the latest YMM version "install box from Catalog >> ymmajax.php", not sure about how to perform this one. I dont have anything called ymmajax.php under my catalog dropdown in the admin panel. I'm starting to run out of ideas =/ Any ideas nor help would be much appriciated! Thanks in advance // Jonas Quote Link to comment Share on other sites More sharing options...
PupStar Posted December 18, 2013 Share Posted December 18, 2013 @@DunWeb Hi Chris, I have a bit of a bug and I am not sure what is causing it. I am using the fork you made for the extra part field and it works to a degree except that when I make a selection from all dropdowns and the ajax invokes it produces 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 ') and p.products_status = '1' and p.products_id = p2c.products_id and pd.produc' at line 1 select count(distinct p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_id in () and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' [TEP STOP] However if I go back to the index.php (the dropdowns are still prefilled) and I click the 'go' button then the code works perfectly and the relevant products are displayed. I have narrowed the offending query down to this one: if($current_category_id){ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "'"; } as for if there is a problem with the ajax then I have no idea. Any help would be appreciated on this one. Thanks Mark Quote Link to comment Share on other sites More sharing options...
PupStar Posted December 19, 2013 Share Posted December 19, 2013 @@DunWeb Hi Chris, I have a bit of a bug and I am not sure what is causing it. I am using the fork you made for the extra part field and it works to a degree except that when I make a selection from all dropdowns and the ajax invokes it produces this error: However if I go back to the index.php (the dropdowns are still prefilled) and I click the 'go' button then the code works perfectly and the relevant products are displayed. I have narrowed the offending query down to this one: if($current_category_id){ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where " . (YMM_FILTER_PRODUCT_LISTING == 'Yes' ? $YMM_where : '') . " p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "'"; } as for if there is a problem with the ajax then I have no idea. Any help would be appreciated on this one. Thanks Mark ok I found out what the issue was. As the part code I had 12" and when I changed it to just 12 it worked now to work out how to escape that character when being called from the database so I can still use the " character. Mark Quote Link to comment Share on other sites More sharing options...
PupStar Posted December 20, 2013 Share Posted December 20, 2013 ok must admit I am now a bit stuck. I need to escape special characters in the 'Part' pulldown so not to cause a 1064 error. Anyone have any ideas or have had to do this themselves? Thanks Mark Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 4, 2014 Share Posted January 4, 2014 Hi, I installed the module as per instructions. I am new to OSC so I guess I am a little lost. I can't seem to add year make and model info in a product and there is nothing in the dropdown boxes, completely empty with no "Choose Make" etc. What am I supposed to do now? Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 4, 2014 Share Posted January 4, 2014 Also is there a way to add more dropdown box searches, I need it for something like "Dodge" - "Ram 1500" - "SLT" - "8 cly". Otherwise this whole cart system wont work for me. Quote Link to comment Share on other sites More sharing options...
PupStar Posted January 4, 2014 Share Posted January 4, 2014 (edited) Also is there a way to add more dropdown box searches, I need it for something like "Dodge" - "Ram 1500" - "SLT" - "8 cly". Otherwise this whole cart system wont work for me. if you use this version by DunWeb 'http://addons.oscommerce.com/info/7835 download the 'FORK' which will give you the extra field you need. If nothing is showing then recheck your install to ensure it is all correct and make sure the year/make/model info is being saved to the database. Mark Edited January 4, 2014 by PupStar Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 4, 2014 Share Posted January 4, 2014 if you use this version by DunWeb 'http://addons.oscommerce.com/info/7835 download the 'FORK' which will give you the extra field you need. If nothing is showing then recheck your install to ensure it is all correct and make sure the year/make/model info is being saved to the database. Mark Hi Thanks for responding. There was one file, products_info.php which I uploaded but i don't see any changes. When I try to set the YMM, it doesn't save anything. Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 4, 2014 Share Posted January 4, 2014 (edited) This is what I see and where it says add new, when I input it and save, nothing saves.. Edited January 4, 2014 by vectorsites Quote Link to comment Share on other sites More sharing options...
PupStar Posted January 4, 2014 Share Posted January 4, 2014 This is what I see and where it says add new, when I input it and save, nothing saves.. and the configuration is set to 'Yes' for the product info page??? Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 4, 2014 Share Posted January 4, 2014 and the configuration is set to 'Yes' for the product info page??? Yes, everything is set to Yes and 6 for number of input fields Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 5, 2014 Share Posted January 5, 2014 @@DunWeb Okay new problem, I reinstalled, made sure I used Dunweb's files this time but now the box destroys the html column tables on the page unless I use it at the end of the right column. Still can't create a new product and enter the ymmp info, wont save anything. What am I missing? Quote Link to comment Share on other sites More sharing options...
vectorsites Posted January 7, 2014 Share Posted January 7, 2014 Can anyone help with this? I need to solve it soon or move to another platform. Quote Link to comment Share on other sites More sharing options...
PupStar Posted January 7, 2014 Share Posted January 7, 2014 @@vectorsites I would say this is down to your <div>'s not been correctly closed or the code placed in the incorrect place. As to why it does not work could be anyones guess. Without checking your install personally then there is no way of knowing. Regards Mark 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.