Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 12/08/2018 in Posts

  1. 11 points
    Hi All.. Here are instructions on how to check how compatible your online store installation / PHP code is against all PHP versions from 5.0 up to the latest version (currently 7.3). This guide requires a minimum PHP 5.4 version to run. This is a medium level skill guide and requires the installation of Composer - a dependency manager for PHP that manages the installation and updates of third party libraries. I will link to the installation instructions of Composer instead of writing how to install it here. It's possible to perform this guide either remotely on the web server in a ssh terminal, or locally on a backup copy of the PHP code. Step 1 - Install Composer Composer can be installed on Windows, Linux, Mac, and Unix. If you're installing on Linux, there may be a Linux distribution package that can be installed depending on your access privileges on the server, otherwise a manual installation is required. The manual installation can be performed locally in your home directory without special user permissions. Instructions for how to install Composer on Windows can be found here: https://getcomposer.org/doc/00-intro.md#installation-windows Instructions for how to install Composer on Linux, Mac, and Unix can be found here: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos Step 2 - Create Composer Project File Composer needs to create a composer project file in the directory where your online store installation or PHP code resides. This will create two files that will be publicly accessible through the web server - this will not pose any security issues. The setup will also eventually create a "vendor" directory however Composer will be configured to place this in the "includes" directory to block public web server requests to the directory. Copy and paste the following to composer.json in the directory where your online store installation resides: { "config": { "vendor-dir": "includes/thirdparty/composer" }, "require-dev": { "squizlabs/php_codesniffer": "^3.4", "phpcompatibility/php-compatibility": "^9.2" } } Step 3 - Install PHP_CodeSniffer PHP_Codesniffer detects violations of defined rules in your code. There are several coding standard rule sets available to make sure each PHP file meets the coding standards. There is no rule set currently available for OSCOM v2.x - for v3 the PSR12 rule set is used. As there will be a lot of violations running this with a coding standard, we will instead run it to use only one rule set to check compatibility against the latest PHP version. We will also configure PHP_CodeSniffer to ignore certain violations which is already taken care of in the online store installation. Run the following command to install PHP_CodeSniffer: composer install After this installs PHP_CodeSniffer and the PHP Compatibility rule set, a PHP_CodeSniffer configuration file will be created to configure the rule set that should be used. Copy and paste the following to phpcs.xml in the directory where your online store installation resides: <?xml version="1.0"?> <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd"> <description>The coding standard for osCommerce.</description> <file>.</file> <exclude-pattern>*/includes/thirdparty/*$</exclude-pattern> <arg name="basepath" value="."/> <arg name="colors"/> <arg value="nps"/> <rule ref="PHPCompatibility"/> <config name="installed_paths" value="includes/thirdparty/composer/phpcompatibility/php-compatibility" /> </ruleset> Step 4 - Run PHP_CodeSniffer PHP_CodeSniffer can now be executed with the following command. It will automatically use the configuration file created in step 3: ./includes/thirdparty/composer/bin/phpcs which will produce the following output report: FILE: admin/includes/functions/compatibility.php --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 15 ERRORS AFFECTING 12 LINES --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 32 | ERROR | Global variable '$HTTP_GET_VARS' is deprecated since PHP 5.3 and removed since PHP 5.4; Use $_GET instead (PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_get_varsDeprecatedRemoved) 33 | ERROR | Global variable '$HTTP_POST_VARS' is deprecated since PHP 5.3 and removed since PHP 5.4; Use $_POST instead (PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_post_varsDeprecatedRemoved) 34 | ERROR | Global variable '$HTTP_COOKIE_VARS' is deprecated since PHP 5.3 and removed since PHP 5.4; Use $_COOKIE instead | | (PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_cookie_varsDeprecatedRemoved) FILE: admin/includes/functions/database.php ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 25 ERRORS AFFECTING 24 LINES ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 179 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead (PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved) 181 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead (PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved) 185 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead (PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved) Here we can see which files violate a PHP Compatibility rule set, the line in the file where the violation occurs, the reason for the violation, and the actual rule set that was violated that we'll be using to ignore the false positive reports with. In the example output, it states that $HTTP_GET_VARS, $HTTP_POST_VARS, and $HTTP_COOKIE_VARS are deprecated since PHP 5.3 and are still used in your online store installation. This is a false positive as osCommerce Online Merchant already has its own implementation to work with or around it. In this case, the variables are safely defined in admin/includes/functions/compatibility.php and includes/functions/compatibility.php. It also states that "mysql_" is deprecated in PHP 5.5 and still used in the online store installation. This is also a false positive as osCommerce Online Merchant wraps calls to the "mysql_" functions if "mysqli" does not exist. We'll add to the PHP_CodeSniffer configuration the rules that can be ignored. The rules can be seen in the output report in brackets ( ). Below is an updated phpcs.xml file with a list of rules being safely ignored for a osCommerce Online Merchant v2.3.4.1 installation: <?xml version="1.0"?> <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd"> <description>The coding standard for osCommerce.</description> <file>.</file> <exclude-pattern>*/includes/thirdparty/*$</exclude-pattern> <arg name="basepath" value="."/> <arg name="colors"/> <arg value="nps"/> <rule ref="PHPCompatibility"/> <config name="installed_paths" value="includes/thirdparty/composer/phpcompatibility/php-compatibility" /> <rule ref="PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_get_varsDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_post_varsDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_cookie_varsDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_session_varsDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_server_varsDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_post_filesDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.session_bug_compat_42DeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.session_bug_compat_warnDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.session_registerDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.session_is_registeredDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.session_unregisterDeprecatedRemoved"> <severity>0</severity> </rule> <rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mysql_escape_stringDeprecatedRemoved"> <severity>0</severity> </rule> </ruleset> Please remember that a lot of false positives will be reported and will need to be individually checked to see if a workaround exists in the PHP code. Additional rules to ignore can be added to the PHP_CodeSniffer configuration file. Happy PHP 7.3 incompatibility hunting!
  2. 9 points
    Harald Ponce de Leon

    Forum Changes

    Hi All.. The forum was down for maintenance today for backend work and to streamline the forum structure. Many of the support forums have been merged (eg, OSCOM v2.x support, installation, upgrades, tips and tricks, ..), and some have been vaulted (eg, OSCOM v3.x, development, ..). The encyclopedia sized forum rules have also been streamlined and now point to the policies on our main website. For a test run, the Clubs section is being shown more prominently on the front page of the forum, showing the last 3 active clubs. This may change again in the future where all discussions are held in Clubs to further streamline the forum structure, and to experiment with entirely new forum front page experiences. Announcements will soon be made regarding the following: v2.x Community Editions Apps Marketplace New Me Website OSCOM v3.x New channels for v3.x discussions will be added to the forum when the announcement is ready to be made. On a personal note, I apologize for my lack of presence in the forum - I have been focused entirely on coding. Many thanks to the moderator team keeping the community civilized. My resources now allow me to do both, so watch out 👀😃 and catch me in the Public Chat area again from this week on.
  3. 7 points
    Harald Ponce de Leon

    Naming Convention

    Yes, at Github. 1.0.0.0 to 1.0.0.2: https://github.com/gburton/Responsive-osCommerce/compare/v1.0.0.0...1.0.0.2 1.0.0.2 to 1.0.0.3: https://github.com/gburton/Responsive-osCommerce/compare/1.0.0.2...1.0.0.3 They will be made aware as CE releases use the same update mechanism from v2.3. This means the update procedure is manual for v2.3 based CE releases (the architecture does not support online updates). Automatic updates will first arrive with v3 and v3 based CE releases. Community Edition maintainers have the ability to push out a release to the website without my intervention. In fact, the website automatically checks Github once every hour to see if a new release has been pushed out at Github and automatically updates the download page and posts a news announcement if one was posted at Github. This will be addressed when Community Editions are officially announced. If they want to stay on PHP 5.6 they can with their current installation. If it runs perfectly today, it will run perfectly tomorrow, and there are active developers in the forum that can help when problems arise. If they want to move to another release or platform, they can't stay on PHP 5.6. There is a lot of excitement when releases are pushed out, however your current installation is not going to burn if you don't upgrade immediately.
  4. 7 points
    swguy

    Frozen

    Whoops! You misspelled "Thank you, Burt, for all your hard work in keeping the osCommerce project alive and relevant. We know we have to keep up with evolutions in PHP and other technologies, and we're glad you are helping us do it."
  5. 7 points
    burt

    Bootstrap 4 in 2.3.4.1

    Bootstrap 3 will be around for years - no point overthinking that, so forget it. The main "problem" will be upgrade php. Some people say php7.2 is working fine, others report it is not working fine. At the end of the 28d, dependant on support thereof, I hope to have gotten enough time in hand to get the following done and complete; make sure shop and admin are ready for 7.2 (at the very least, possibly 7.3 if I can swing it) -> no warnings and no errors product class -> rework relevant modules to use it But as with all things, one step at a time, and right now that step is trying to get some time in hand to actually do "stuff".
  6. 6 points
    burt

    Phoenix Announcements

    CE Phoenix Phoenix is the Master Community Version of osCommerce https://github.com/gburton/Responsive-osCommerce/releases https://www.oscommerce.com/Products Demo Site https://template.me.uk/phoenix/index.php External Libraries https://github.com/gburton/Responsive-osCommerce/wiki/External-Libraries PHP Version Minimum Maximum 7.0 7.1.x Image Credits Images in the default installation are copyright their respective owners; Image Owner osCommerce Logo osCommerce Phoenix Logo G Burton Oranges Eelffica from Pixabay Lemons Eelffica from Pixabay Pears Eelffica from Pixabay Apples Eelffica from Pixabay Tomatoes Rocky_H from Pixabay Heart Gerhard Gellinger from Pixabay Thank You To all shopowners, developers, consultants and business owners who have supported the project over the years. Beer Tokens "Beer Tokens" are not used to purchase beer - they are used to give time into the Project. I am hopeful that enough shopowners, developers, consultants and businesses ... will join the Phoenix Club to allow two professional developers to work on the code on an ad-hoc basis. Join the Phoenix Club If you wish to sponsor ongoing and future development, please consider joining the club https://forums.oscommerce.com/clubs/1-phoenix/
  7. 6 points
    Jack_mcs

    Category Images

    A new version has been uploaded with these changes: Added a version for Phoenix. Added an option to allow controlling which categories are displayed. Added a module for sub-categories. Added a module for categories with product pages. Changed install text to mention the equal heights addon. Corrected mistake in the module that was storing some of the settings in the wrong place. Corrected mistake in the css that would prevent other css from working. Moved the css code from user.css to the ext/css/category_images,css file. Replaced unused variable with the correct code. Found by member @Moxamint.
  8. 6 points
    burt

    Confusion over osC Versions.

    It maybe worth everyone who has a link to link to the post that is in my sig. I can then keep that post updated as more releases come along.
  9. 6 points
    I think it would be great to make a package (called frozen 2 or as you like) that has the new admin of @shetch and the Frozen version with its bug fixes so that new users can download them in one place. What the community lacks are periodic updates to show that the software is alive. I do not know if this is the best place to post it, but the work of @shetchis fantastic, it's the cooler in oscommerce for a long time and it would be great to integrate it into the Frozen package. What do you think? Best regards. Valqui
  10. 6 points
    burt

    Email queuing system

    Great, it's looking good... Burty signed up today but didn't complete a checkout - Email will go out in 5 days asking if there was a problem *** - Email will go out 31 July with birthday wishes (21 days prior to his birthday) Dan signed up today and gave his birthday, and completed a checkout - Email will go out 27 April wishing him a happy birthday (approx 3 weeks prior to birthday) - Email will go out 10th May (60 days) asking for a review - Email will go out 10th March 2020 asking why he hasn't ordered for a year *** Rene completed a checkout today - Email will go out 10th May (60 days) asking for a review - Email will go out 10th March 2020 asking why he hasn't ordered for a year *** Steve completed a checkout today - Email will go out 10th May (60 days) asking for a review - Email will go out 10th March 2020 asking why he hasn't ordered for a year *** *** - these emails get cancelled depending on customer interaction. As an example, let us say that Burty logs in 2 days from now (13 March)...and completes a checkout...what happens: no_checkout is cancelled as he has now checked out request_review goes out in 60 days (so May 12th or so) from the date of sale winback will go out about 13th March 2020 asking why he hasn't bought anything for a year (remembering that this would be cancelled if he did log in inside that year) Pretty cool little system ? I'm pleased with how it's turned out. You may have noticed I made a "no_checkout" slug - it took less than two minutes, no core code changes - all plugged into the system automatically. BOOM! That is the future of osCommerce.
  11. 6 points
    Smoky Barnable

    Addon Feedback

    @JcMagpie These are your addons and support threads and the community will benefit from them. Please reconsider offering public support. I know it can be distracting having to read posts from "professionals" that feel threatened by you, but I think it's best to not take the bait and simply ignore/report inappropriate posts.
  12. 6 points
    bonbec

    Addon Feedback

    The interest of a forum is to be able to read both the question AND the answer. We are rarely the only one to have a problem. Find the answer on the forum, it helps a lot, lived experience. If the answer is made only by PM, it does not help the community at all.
  13. 6 points
    bonbec

    Addon Feedback

    Certainly, a member of the forum may have been the straw that makes the vase overflow, but it should not be seen as a personal attack. I think some here forget what OsCommerce is all about: allowing shop owners to have an online store. Competition is often due between shop owners who have the same activity. The customer will not necessarily choose the lowest prices, but he will choose a site where navigation is fast. A site can be fast thanks to a good host, but also because its code is clean and optimized. A code with lots of code errors (html, php and / or mysql) will slow down the site, creating random errors that will be displayed to the client. And that's not good at all. To be able to report a badly realized addon is not to declare the war to its author, but to render a service to all the shop owners who will install it. A shop is not a toy, it is a source of income. I think I remember that in his HPDL roadmap came the idea that addons should be checked before publication. This joins burt's idea in a way.
  14. 5 points
    General support/feedback for Bootstrap 4 admin See https://apps.oscommerce.com/LCrov&amp;bootstrap-v4-oscommerce-admin-ce
  15. 5 points
    burt

    Confusion over osC Versions.

    CE is the umbrella term for my "Responsive" fork on Github. What I am working on is called Edge. Gold (release) is a fixed point along that Edge timeline. Frozen (release) is a fixed point along that Edge timline. I suspect there may be more fixed points in the future, but that depends on the Community at large helping...instead of throwing stones. Edge is (and always has been) a work in progress. It's easier to say the work is "bad" than to actually help shopowners get a good responsive and useable version of osCommerce, hence some of the posts we've all seen in the last 12 months. And then I see those same moaning minnies using the CE for their clients or for their own shop Copyright Any file that IS in CE and IS NOT in official is a new file. New files are copyright their respective author. If anyone believes they wrote one of these new files and the copyright is incorrect on that file, raise an issue on Github and it will be sorted. Respecting copyright is very important and if I have failed in that, I want to know. Naming/Tagging (and other areas that could be changed) Agreed that things could be better, but you know what...get involved and it might get changed. The last person who did get involved...wanted the version checker changed on release of Frozen, so it was changed to accommodate what he wanted. Moaning and groaning (about anything I do or don't do) whilst you have done nothing to help...is not an ideal situation. When all that is said and done, I thank you all for your feedback, it's been taken on board. Now, a couple of people who have posted in this thread have actually done positive things for the community since Frozen was released - I'm sure you have received thank you's from the thousands of users of the CE releases. If not, that's not ideal - accept my thank you now - thank you. As for the ones who are "loud" in their opinions yet have done nothing to help, I challenge you to actually step up to the plate and start swinging. If you don't swing you won't get a home run... As you guys have been so candid in your opinions, I hope that I'm allowed to give my opinion in the same candid manner. So I ask each of you who have posted here and anyone else reading this a rhetorical (ie does not need answering here, just have a think on it) question..."have you done your part in making osCommerce a viable option for todays shopowner needs" ?
  16. 5 points
    The next update will be pushed out this month and takes care of that 👍
  17. 5 points
    burt

    php 7.2 - updating CE

    I'm slowly but surely, as and when I can give time, updating the software. Thanks to all who are helping the software to move forward 👍
  18. 5 points
    burt

    Addon Feedback

    Would it be of interest to the shopowner community if public feedback was given on addon support threads? Feedback could be from other shopowners and from coders. I'm thinking things like: This addon uses incorrect HTML This addon is not multilingual This addon should use addBlock not addContent This addon is excellent in all regards etcetc
  19. 5 points
    burt

    Addon Feedback

    Back to CONSTRUCTIVE Addons Feedback. Let's try it. Feel free to start giving constructive feedback on Support threads. I am certain that addon makers will thank you for it. Addon makers: if the feedback is not constructive or is just personal rubbish, report the post using the usual mechanism.
  20. 5 points
    altoid

    Addon Feedback

    This is a great idea. Feed back should address funtionality, compatibility, etc. And not include personal attacks, snide remarks and so on. Feedback that goes personal should be removed. No drama please, I get that enough in today's politics.
  21. 4 points
    BrockleyJohn

    Frozen bug list

    I suggest if ( ! is_array($params) ){ $params = array(); } if ( ! isset($params['type']) ) { $params['type'] = 'submit'; } instead. That prevents you losing other parameters if type is not set.
  22. 4 points
    The class constructor has a syntax error which is why the Apps Marketplace did not accept the upload. Here is the class constructor of includes/modules/header_tags/ht_jcm_owl_carousel2_js.php: function __construct() { $this->title = MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_TITLE; $this->description = MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_DESCRIPTION; if ( defined('MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_STATUS') ) { $this->sort_order = MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_STATUS == 'True'); } } global $oscTemplate, $category_depth; if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && (isset($category_depth) && $category_depth == 'top') && ! isset($_GET['manufacturers_id'])) { $oscTemplate->addBlock( '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.css">' . "\n", $this->group); $oscTemplate->addBlock( '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css">' . "\n", $this->group); } } Either the constructor is closed early before the global statement, or a function name is missing. Either way, it's good now that the Apps Marketplace can detect such issues 👍
  23. 4 points
    burt

    Email queuing system

    These two (especially the reviews one) are game changing for shopowners, in my opinion. I'm trying to make another game-changer based on the ideas in this thread and have gotten it sort of working; In this example, a new customer "Donald Duck" just signed up...he gave his birthday as 10th November 1960; send at (birthday) will go out 21 days prior: 20th October send at (shipping follow up) will go out in 21 days from now send at (request review) will go out 30 days from now That's the basis of this system. I will also create an admin page where shopowner can easily see the email queue and delete/add emails. This is a complicated project, but I have it under control. Any more ideas for emails to go into the Email Queue?
  24. 4 points
    bonbec

    Addon Feedback

    I really do not understand why this is a problem to be helped to design a addon in the rules of art. For those who write the addon, it is a way to learn through the help of others. For those who will use the addon, it's the security of knowing that the addon will do what it was designed without bugs to correct. For having helped several shop owners, I realized that corrective updates of addons were only rarely done. Which can create security problems among other things.
  25. 4 points
    burt

    Addon Feedback

    Coder to "Coder": The idea would be to advise the "coder" that he/she has made mistake(s) and to point out what could/should be done in a different way. Shopowner to "Coder": The idea would be to let other Shopowners know what did not work as expected. In other words, keeping things factual so that the "coder" can learn from his errors, fix up code and start to produce better addons. That is, surely, a win-win scenario for all; the coder learns from his mistakes the ones using the code if the coder remakes it into a better version future users will never have to download code that is not ideal osCommerce gets more well coded addons into the Apps area It is certainly not a case of "point and laugh", it is a case of making "coders" aware that they have a basic responsibility to make addons that are not broken from the outset. How can one learn if constructive feedback is not given ? Personal Viewpoint I'm probably the coder that has been here the longest - some of my early addons were DIRE - including one that included a hack vector - my knowledge simply was not good enough at the time and I was trying to show off 😕 Even today, 20 years later, I make mistakes. There is a mistake in one of my 28d things that a shopowner noticed - I had not noticed it - I thanked the shopowner for the heads-up and fixed the code, and will send out the renewed file to replace the old.
×