Posts tagged oscom30

Posts tagged oscom30
11 notes &
Lots has happened during the week! Here is a summary of some of the events:
One of the great new features of our framework is the ability to perform upgrades via the Admin Dashboard, where update packages are listed, modified files can be seen, and upgrades can be performed at the click of a button.
Unfortunately not everyone will get to experience how great this can work with the v3.0.1 release as CoreUpdate in v3.0 can detect incorrect file permissions under certain server environments during an upgrade procedure, and reports back of a successful upgrade when no files were updated at all. This affects you if after the upgrade to v3.0.1, v3.0.1 is still listed as an available update package to upgrade to.
Those affected can download the manual v3.0-to-v3.0.1 upgrade package to extract and copy over to their installation via FTP. Although also an easy procedure, this is not the kind of experience we want to share with you when upgrading.
We’ve taken this opportunity to improve CoreUpdate in v3.0.1 and are extremely pleased with how it now handles upgrades.
CoreUpdate utilizes Phar to download signed phar update packages from our server, to list the contents of the update package to show which files are going to be modified, and to extract the files over the installation to perform the upgrade.
It sounds easy, but when file permissions become an issue, Phar panics and produces a fatal error that can stop further processing of PHP code.
We’ve improved CoreUpdate to better handle file permissions and situations where Phar can produce unexpected errors. Instead of just extracting files in an update package to the installation, CoreUpdate now tracks which files are going to be modified, backs those files up, extracts the updated files in place, and if all files have been successfully updated, goes back and deletes the older files no longer necessary. If an unexpected error occurs, CoreUpdate deletes the files that have been extracted and restores the original files automatically reverting to the original state.
There are a lot of server environments and file permissions CoreUpdate has to handle, and we’re striving to make it “just work” to provide the best user experience as possible.
CoreUpdate is still in its infancy. We imagine that update packages can first be tried before an actual upgrade is performed, to test and make sure customizations continue to function as normal in a live environment. Phar allows this and we look forward to taking advantage of its full feature set to make this possible.
We know that feeling of pushing an “Upgrade” button and want to turn that fear into a pleasurable moment. We enjoy the challenges working with the strictest levels of error reporting to richen our creativity and produce even better code.
And we can’t wait to bring CoreUpdate to Add-Ons!
This is the first of a multi-part series documenting the new framework architecture of osCommerce Online Merchant v3.0.
Those that have not been following the development of the new framework will receive quite a shock when they download the osCommerce Online Merchant v3.0 release package and start inspecting its source code. The new OO/MVC design approach will be completey foreign to those accustomed to the procedural style design v2.2 was based on. This is a new ballpark to play in, and it’s open for everyone to participate!
The first difference that will be seen is the new file and directory structure of the framework, specifically how clean it is. What’s provided is:
That’s it! The index.php file initiates the framework and the public directory holds site and template related images, stylesheets, javascript, and other assets that must be publicly available. The osCommerce directory is where the source code of the framework resides and is recommended to move to a PHP include directory that is outside of the public html directory serving the website.
The framework is initialized by the main OSCOM controller located at osCommerce/OM/Core/OSCOM.php. It’s main responsibility is to automatically load Sites, Applications, and Actions depending on the request URL.
Sites? Applications? Actions?
These are new modular sections of the framework that build the website. Correction, that build websites. The basis of the framework is flexible to support different kinds of websites, for example, a website content management system, a blog, a forum, etc., and with your help, will be improved on in future releases to support the building of such sites even easier. Our primary focus will remain on e-commerce - we can’t wait to see what the community builds in addition!
osCommerce Online Merchant v3.0 is built with the following four Sites:
The Shop Site is the frontend of the shop, the Admin Site is the administrative backend to the shop, the RPC Site manages JSON requests, and the Setup Site installs and configures new installations.
The first part of the request URL loads the specific Site. For example, the Shop Site would be loaded with the following URL:
http://demo.oscommerce.com/index.php?Shop
Sites are formed by areas packaged as Applications. The Shop Site includes the Account, Checkout, and Products Applications, and are loaded by the second part of the request URL:
http://demo.oscommerce.com/index.php?Shop&Account
Applications define the default page content to load and can be fine-tuned with Actions. Actions override the default loading page and can execute certain functionality that is loaded by the third part of the request URL. The log in page, which is part of the Account Application, can be loaded with the following URL:
http://demo.oscommerce.com/index.php?Shop&Account&LogIn
Actions are recursive - the processing of the log in page is performed by the following URL:
http://demo.oscommerce.com/index.php?Shop&Account&LogIn&Process
This allows new Sites, Applications, and Actions to be copied to the framework directory which work immediately without the need to edit core source code files.
The controllers loaded for the above examples are defined in the following file and directory structure:
osCommerce/OM/Core/Site/Shop/Controller.php
osCommerce/OM/Core/Site/Shop/Application/Account/Controller.php
osCommerce/OM/Core/Site/Shop/Application/Account/Action/LogIn.php
osCommerce/OM/Core/Site/Shop/Application/Account/Action/LogIn/Process.php
Sites and Applications are self contained. Its required classes are located in its Site and Application directories, and are accessible by other Sites and Applications.
A default Site is defined in the configuration to load for requested Sites that do not exist, and to shorten the URLs used within the default Site. The default Site for new installations is Shop allowing for the following shortened URL:
http://demo.oscommerce.com/index.php?Account&LogIn
This works only for Sites and Applications that do not share the same names. For example, the above URL would load the Account Application and LogIn Action from the Shop Site if no Account Site exists. If an Account Site exists, it would be loaded instead with its LogIn Application.
Custom modifications to the framework must be performed in the following directory:
osCommerce/OM/Custom/
This directory is empty for new installations and follows the same file and directory structure as the osCommerce/OM/Core/ directory. Before files are loaded from the Core directory, a check is performed to see if a matching named file exists in the Custom directory to load instead. This allows for any part of the core framework to be overridden and for the core framework to be easily updated to newer releases without losing custom modifications.
Stay tuned for The New Framework Architecture (Part Two: Namespaces)
(Source: countdown.oscommerce.com)
We are fortunate to have a unique relationship with our community that is based on trust. This was built on and earned naturally from the very beginning when we first announced ourselves to the world in March 2000. Our user base has grown from a few people to millions worldwide, attracted through curiosity and interest - not by hype or marketing campaigns.
Attracting such a large amount of interest was possible by releasing our products under the Open Source GNU General Public License and allowing people not only to work with the source code of our products, but to actively participate in discussions and development, and be involved in the direction we were taking.
We were first called “The Exchange Project” to reflect the relationship between sellers and buyers exchanging goods, and to also reflect people participating and exchanging ideas in our community. Our first slogan was “Community Made Shopping”.
We introduced a lot of our community members to PHP and Open Source. Store Owners that had enough of the limitations of point-and-click solutions now had the power to dive into the actual source code of our products and to perform the modifications they required. They shared the same beliefs in exchanging ideas and Open Source, and started to contribute additional features to share with the community.
There are now over 6,400 Add-Ons that have been contributed by our community members, available for free as Open Source for others to use, modify, and help improve on. That’s over 27,000 uploaded archives with over 48,000,000 lines of code!
Our Community Rocks!
Not only has Open Source helped us establish a thriving worldwide community of store owners, developers, and enthusiasts, it has also created opportunities outside our community by spawning many project forks, commercial solutions, and commercial services, and have also inspired and influenced many Open Source and commercial solutions available today.
The GNU General Public License has served us well for 11 years and with the launch of osCommerce Online Merchant v3.0, is now time to move on and target higher goals.
We want to take our success with Open Source even further and continue sharing it with you. We want to create even more business possibilities and opportunities for store owners, developers, and our community. We want to spawn even more project forks, commercial solutions, and commercial services that anyone and everyone can profit from.
We want to be at the core of e-commerce!
To make this possible, osCommerce Online Merchant v3.0 will be released under the BSD license, completely. All source code including the core framework and modules will be published under the BSD license.
Sharing all of our hard work, for free, under the BSD license. We are giving you total freedom!
This will drive innovation and competition further in our eco-system. Community members now have the choice to release their Add-Ons under a BSD compatible license or to continue using the GNU General Public License. Commercial Add-Ons will be accepted later this year through an integrated market place providing the best user experience we can offer.
We are one of the first general solutions to move to PHP 5.3, and are now also one of the first general solutions to move completely to the BSD license and give you total freedom.
Open Source Rocks!
(Source: countdown.oscommerce.com)
3 notes &
A script is available to check the minimum requirements and settings for osCommerce Online Merchant v3.0 on a PHP enabled webserver.
To check your server, download the following package from Github, unpack it, copy oscom_check.php to a public html directory on your server, and call it with your browser.
https://gist.github.com/gists/881326/download
An example output of the results can be seen at:
http://countdown.oscommerce.com/oscom_check.php
osCommerce Online Merchant v3.0 will successfully run on your server when all required conditions have been met and are shown as green.