Jack_mcs Posted June 13, 2020 Author Share Posted June 13, 2020 A new version has been uploaded with these changes: Changed call to defined location in database_optimizer.php. Found by @raiwa. Fixed some compatibility issues with php 7.3. Added a version for Phoenix. Removed the calls to load the filename and database files in the After 2.3 version. Replaced mysql_error with mysqli_error for php 7 compatibility. Found by @Demitry. Updated the included Version Checker file that works with the new apps section. Omar_one, Demitry, raiwa and 2 others 5 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Demitry Posted June 22, 2020 Share Posted June 22, 2020 @Jack_mcs hi Jack, I updated all the files for the new 1.8 version of this addon and ran it for the first time last night. One of the errors I got was for the tep_draw_bootstrap_button() function for that Update button. I have BS Edge and since there is nothing in the package for any osC versions older than Flatline (Frozen), I had to apply the changes for that version to BS Edge. However, in doing so, I noticed that Flatline does not have the tep_draw_bootstrap_button() function defined either. I got this function from Zombified Phoenix and the Update button now displays & works as it should. The other issue was a PHP warning I got regarding a non-numeric value related to the following file and line. The database optimization summary is also listed below. I looked up that line and here it is. $dateOrder = date("Y-m-d", time() - ($config['orphan_orders'] * 86400)); So, three issues: 1) There is no package solution for any osC versions older than Flatline (Frozen) 2) The tep_draw_bootstrap_button() function does not exist in Flatline for the Update button, which is in the admin/database_optimizer.php file 3) The calculation for $dateOrder variable in admin/includes/modules/database_optimizer_common.php on line 165 is producing a PHP warning of a non-numeric value I should also mention that I have not made any adjustments to the default setting in the configuration part of this addon. Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 22, 2020 Author Share Posted June 22, 2020 (edited) 5 hours ago, Demitry said: 1) There is no package solution for any osC versions older than Flatline (Frozen) 2) The tep_draw_bootstrap_button() function does not exist in Flatline for the Update button, which is in the admin/database_optimizer.php file 3) The calculation for $dateOrder variable in admin/includes/modules/database_optimizer_common.php on line 165 is producing a PHP warning of a non-numeric value 1) There is a version for "Before 2.3". I don't recall I updated it for this version. Probably not. With Phoenix becoming more and more popular and with it changing often, managing multiple versions is just not possible any longer, at least for me. If you need an addon to work for older versions, you can Use an older version. This is not a good idea since you will lose fixes and improvements. Convert the code to work with an older version. Pay someone to do the conversion. 2) This got through because of lack of time for testing older versions. To fix it, you can replace <td align="center"> <?php echo tep_draw_bootstrap_button(IMAGE_UPDATE, 'fas fa-save', null, 'primary', null, 'btn-success btn-block btn-lg'); ?> </td> with <td align="center"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE);?></td> 3) I'm not able to reproduce this but in searching for it, it seems to be a bug in php 7.1 and, maybe 7.2. I'm running 7.3 so it seems they fixed that problem. Applying the change below should prevent it but since I can't see the warning, I can't be sure. Change this line $dateOrder = date("Y-m-d", time() - ($config['orphan_orders'] * 86400)); to $dateOrder = date("Y-m-d", time() - (int)($config['orphan_orders'] * 86400)); Edited June 22, 2020 by Jack_mcs Demitry 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Demitry Posted June 23, 2020 Share Posted June 23, 2020 Quote 1) There is a version for "Before 2.3" This is not in that package for version 1.8 ...and I have BS Edge as I originally stated, which is after version 2.3.4. The oldest version in that package is Flatline. For number two, I had made the fix as I stated, in my post above. I was just letting you know about this as a potential issue for others updating to this latest version because without that PHP function defined, you get a PHP Fatal Error. As for number three, thank you for the fix. I have not applied it yet, but will, and I'll test it afterwards. I am on PHP7.2 at this time, so this might be the cause of this PHP warning. Thank you for your reply. Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 23, 2020 Author Share Posted June 23, 2020 9 minutes ago, Demitry said: This is not in that package for version 1.8 ...and I have BS Edge as I originally stated, which is after version 2.3.4. The oldest version in that package is Flatline. The package I have here, which is what I uploaded, has these directories in it: Before_2.3 Frozen Phoenix That covers all versions of oscommerce though, as mentioned, they may not all be current. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Demitry Posted June 23, 2020 Share Posted June 23, 2020 (edited) Quote Before_2.3 Sorry Jack,.. my mistake on that point. I had to look at the package again to see this. I skipped over that folder because I have BS Edge, which is after version 2.3 UPDATE: I ran a test database optimization after making that change you mentioned and there was no PHP warning. So, it works! Thanks. Edited June 23, 2020 by Demitry Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Demitry Posted June 24, 2020 Share Posted June 24, 2020 (edited) Just an addition/addendum to my previous comment. Although there is a folder in the package for osC versions Before_2.3, ..there is a large gap from version 2.2 to the Flatline version, including osC versions 2.3, 2.4, BS Edge, Gold, and everything in between. This is no longer an issue for me, but it could be for anyone else who has an osC version that is part of that gap. Edited June 24, 2020 by Demitry Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 24, 2020 Author Share Posted June 24, 2020 10 hours ago, Demitry said: This is no longer an issue for me, but it could be for anyone else who has an osC version that is part of that gap. That is the situation with all addons. Most of the new ones for Phoenix don't even have a Frozen version, much less pre-Frozen versions. I've always tried to include versions for all shops in my addons but that is going away. Even now, I don't have the time to test Frozen versions and may stop supporting all pre-Phoenix versions. I offer paid support for them but trying to code for all shops in the free versions just takes too much time. 14steve14 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Demitry Posted June 25, 2020 Share Posted June 25, 2020 (edited) Quote ... but trying to code for all shops in the free versions just takes too much time. I totally understand! I have a bunch of addons that I don't care to dedicate time to for a completely dead software. Cheers for doing this update! I appreciate it. Edited June 25, 2020 by Demitry Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Philo2005 Posted February 19, 2021 Share Posted February 19, 2021 How much time is "86400" in years, month, days? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 20, 2021 Author Share Posted February 20, 2021 See here. Philo2005 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Philo2005 Posted February 21, 2021 Share Posted February 21, 2021 Great tool Jack, exactly what I was looking for! I miss only reorganization of the working files such as:- action_recorder - oscom_app_paypal_log Will these files be included in the procedure at some point? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 22, 2021 Author Share Posted February 22, 2021 11 hours ago, Philo2005 said: Will these files be included in the procedure at some point? Thanks for the suggestions. I will put them on the list. Whether they ever get released or not will depend on what happens with V4. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons 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.