Jump to content


Popular Content

Showing content with the highest reputation since 03/19/2019 in all areas

  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. 8 points

    Phoenix Announcements

    Phoenix How to update Make sure you have applied the hotfixes -> Make sure you have applied the hotfixes -> Make sure you have applied the hotfixes -> Make sure you have applied the hotfixes -> Apply the files -> You could also simply download & install the latest v1.0.1.0 https://github.com/gburton/Responsive-osCommerce/tree/ and install it. You could make commit by commit changes to https://github.com/gburton/Responsive-osCommerce/compare/ I suggest the simplest way (assuming you are on is to grab the zip, unzip it, and upload the files. Special Thanks to @raiwa for collating and updating the modular shopping_cart to @raiwa @Tsimi @kymation @Dan Cole for their original modular shopping_cart files Notes As this is a feature release, you must also go into admin and install the shopping_cart module(s) if you are upgrading. Admin > Modules > Content > {Install} - and you will find them. As usual, these modules are configurable by sort order, width etc. Enjoy.
  4. 7 points
    Harald Ponce de Leon

    Naming Convention

    Yes, at Github. to https://github.com/gburton/Responsive-osCommerce/compare/v1.0.0.0... to https://github.com/gburton/Responsive-osCommerce/compare/ 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.
  5. 7 points


    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."
  6. 6 points

    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

    Do I have to reinstall <sigh>

    I'm doing all addon updates and development on a local PHP 7.3.2 installation with Phoenix and since today and no problems until now.
  8. 6 points

    Discount Code BS

    New version uploaded: Version 5.1.0 Phoenix Changes: Removed support for earlier EDGE versions Fix for discount not showing on first page load in ship in cart order total module in shopping cart, disable "Apply" button until code is validated. Added sitewide hook for session unregister of discount code on logoff ( @burt, sitewide hook used for the first time 😀) This Package will be separated in a neew addon, once a proper label for Phoenix version is available.
  9. 6 points

    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.
  10. 6 points

    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.
  11. 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
  12. 5 points
    General support/feedback for Bootstrap 4 admin See https://apps.oscommerce.com/LCrov&amp;bootstrap-v4-oscommerce-admin-ce
  13. 5 points

    Phoenix Announcements hotfixes and enhancements How to update Make sure you have applied the hotfixes -> Make sure you have applied the hotfixes -> Make sure you have applied the hotfixes -> Apply the hotfixes -> You could also simply download & install the latest v1.0.0.4 https://github.com/gburton/Responsive-osCommerce/tree/ and install it. You could make commit by commit changes to https://github.com/gburton/Responsive-osCommerce/compare/ I suggest the simplest way (assuming you are on is to grab the zip, unzip it, and upload the files. Special Thanks @Harald Ponce de Leon for working on 7.3 compatibility 👍 the forum members who took time to look at demo site and point out issues 👍
  14. 5 points

    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" ?
  15. 5 points
    The next update will be pushed out this month and takes care of that 👍
  16. 4 points

    Facebook Messenger Chat Box Addon

    I've developed a neat little header tag module that drops a Facebook messenger chat box into your site - so much easier than trying to get one of the live chat addons to work and its free. Connects to your Facebook (business) Page simply. I've tried it on EDGE and PHOENIX and it works perfectly (I'm sure it will work on any version... but haven't tested it). Configurable to have the chat box open on load or not (showing the Facebook Messenger Icon only). The only thing you need is your Facebook Page ID which can be found with following instructions: To find your Page ID: From News Feed, click Pages in the left side menu. Click your Page name to go to your Page. Click About in the left column. If you don't see About in the left column, click See More Scroll down to find your Page ID below More Info. Quick Edit - some need to whitelist their domains within their Facebook page: Click Settings at the top of your Page Click Messenger Platform on the left Edit whitelisted domains for your page in the Whitelisted Domains section Screencap attached Addon found here: https://apps.oscommerce.com/Apps&amp;e18Iy&amp;facebook-messenger-chat-box-addon
  17. 4 points
    Uloaded update for Phoenix 1.0.1.x: Related Products Phoenix 7.0 Update Version Phoenix 7.0: - Updated for CE Phoenix 1.0.1.x - fixed undefined warning in admin/optional_related_products.php if product info module is not installed. - updated template class in product info module to core naming convention "cm-pi-related_product" - update structured database - added config entries for columns/viewport like also purchased products module. - removed obsolete height control config entries. - moved html to template - general file cleaning (tabs/spaces, UNIX new line)
  18. 4 points

    [Contribution] Ship In Cart

    Phoenix update uploaded: Ship In Cart CE reloaded Changes Vers. 5.0: - Update for Phoenix 1.0.x.x - html code moved to template
  19. 4 points

    Phoenix Rising...

    Phoenix Rising...
  20. 4 points

    Discount Code BS

    New Version 5.0.0. uploaded: Discount Codes BS 5.0.0. Changes: Added support for EDGE BS4 Removed ht-Module Moved validation script from ht to content modules Moved code from application_top.php into discount_code.php Added checkout payment content module to replace code injection in HT module Added install warning for required OT module to content modules Added condition to show "Apply" button in shopping cart module only if "Ship in Cart" Order Totals Module is present. Updated template names to actual naming standard Updated template calls in content modules to actual auto inclusion Moved html output to content module template files Normalized True/False typo in OT module Hooked modifications in checkout_process.php and paypal standard files. @MITCH70, thanks for testing @Tsimi, maybe the main description of the addon could be updated. I have no privileges to edit it, can you please.
  21. 4 points

    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

    Confusion over osC Versions.

    I've implemented sitewide hooks on a Branch here - https://github.com/gburton/Responsive-osCommerce/tree/201906/includes/hooks/shop/siteWide Take for (eg) the Bootstrap one, it includes easy versioning, as so: https://github.com/gburton/Responsive-osCommerce/blob/201906/includes/hooks/shop/siteWide/bootStrap.php#L18 This should help a lot for shopowners being able to recognise exactly what they are running.
  23. 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 👍
  24. 4 points

    php 7.2 - updating CE

    With a big thanks to @Heatherbell I have a day next week and a day the week after to commence work on; fixing php7.2 warnings and errors translating old x.x (some of which relates to php4!) php code to newer 7.x formatted code In the meantime, if anyone sees any more errors/warnings please reply to this thread stating what the error says and where you found it (eg an URL) or how you made the error appear (eg only happens when pressing edit on XYZ module) and so on. As much details as you can give would be very helpful.
  25. 4 points

    Email queuing system

    Real life feedback/ideas from shopowners lead me to this change; With one extra line of code in the main module I made this a reality, so now it's possible to use the {{TAG}} system in the Title as so: and when received looks like (eg) this: Pretty damned cool!