-
Notifications
You must be signed in to change notification settings - Fork 63
Upgrade to WebStore 2.1
This document will detail the upgrade directions from Web Store 2.0.x to 2.1. This upgrade is a significant upgrade. Nearly every file has been changed in 2.1 because of the removal of the Zend Optimizer requirement. Because of the significant amount of changes in 2.1, the recommended upgrade path is to temporarily remove your current installation, install a clean copy of 2.1.0 and then copy back your custom files and templates. The steps below outline this procedure.
NOTE: Web Store 2.1.x is only supported on LightSpeed 3.5.x. Several changes pertaining to Web Store were made in 3.5 and work only in conjunction with the new 2.1 software. Please contact LightSpeed if you have questions about your eligibility to upgrade.
- Open Source Web Store! Beginning with Web Store 2.1, core files are no longer encrypted with Zend and you no longer need Zend installed on your web server for Web Store. Any file in Web Store can be viewed and edited (however, not every file should be edited. Please review our Best Coding Practices for additional information.)
- Promo Codes: Also known as Coupon Codes, you can distribute codes which apply discounts to orders on Web Store. Codes have an effective start and stop date, and can discount by percentage or dollar values, and include restrictions such as thresholds (i.e. only good over $50) or applied to certain product codes.
- Tier-based shipping: Provide shipping prices based on cart value brackets ($0-49.99, $5.00 shipping, 50-149.99 $12.00 shipping, etc)
- Free shipping: Easily set free shipping with optional threshold
- Advanced Search: Narrow down your search to a price range or within a specific category
- Configurable Session Management: Set Web Store/PHP sessions to use File System or Database
- Optimized Code and in-code documentation: Many features have been optimized for speed and efficiently, resulting in a faster purchasing experience. Additionally, functions and templates have added comments and descriptions to make customizing easier
Please note that these directions are only for customers who are hosting their own Web Store. Customers hosting with LightSpeed will be upgraded to the new version as part of our services, and you will be notified about this process.
Prior to following the steps below, it is recommended that you point any links to your Web Store from external websites (such as your main website) to a page that mentions to your shoppers that the Web Store is under maintenance.
- Take a full backup of your Web Store's source code. We recommend downloading your website via FTP to a local drive. Ensure that your FTP client is set to download in strict raw binary mode. Failure to ensure this will result in a corrupted backup of your Web Store source files. The critical files are your /includes/configuration.inc.php file as well as your /assets folder if you have made any customizations, and your /templates folder for whatever template set you have customized. Also note if you have had web designers modify your website, you may wish to contact them for assistance for this upgrade.
- Take a backup of your Mysql database. You can use an SQL utility like phpMyAdmin from your web server's administrative panel, or alternatively login via ssh to take a backup directly if this is available to you.
- Download and open the Web Store 2.1 Installer. First, delete all files except for the files noted below from your current Web Store root directory either via FTP or SSH (delete only the files in the folder, not the folder itself). Copy all the files in the "Files to upload" folder in the installer to your Web Store root directory on your web server via FTP. Exceptions: If you have a custom php.ini, php5.ini or custom .htaccess file in your root, leave these files in your Web Store folder. Also you can leave your /photos folder alone since this will contain your header image and possible product photos.
- You will need to manually build a new configuration.inc.php and upload it to the includes folder in your Web Store root directory. Follow the directions below to do this. You cannot copy your existing configuration.inc.php since there are too many modifications.
- If you have modified your current templates, or created your own theme copy over your template from the templates folder from the backup taken in step 1, otherwise, you may skip this step.
- If you have modified or added files in the assets folder copy over only the files you have modified from the assets folder in the backup you took in step 1, otherwise, you may skip this step.
You will need to extract key information from your configuration.inc.php file and build a new file to use on Web Store 2.1. In the source code, locate the following file: /includes/xlsws/dist/configuration.inc.php
Make a copy of this file where you can edit it and then make the following modifications:
- Change define ('SERVER_INSTANCE', 'dev'); to define ('SERVER_INSTANCE', 'prod');
- Replace all INSERT instructions such as /INSERT_DOCROOT/ with the information from your original configuration.inc.php file.
You can copy/paste these lines from your original configuration file as well, just make sure that the database encoding for utf8 remains since that is a new line.
Upload this new configuration.inc.php to your /includes folder
Your website will not load (white screen) until you perform the Upgrade Web Store Database command in the Web Admin panel. New fields were added for additional functionality, and the Upgrade command will modify your database with these new fields. You may perform an upgrade of this by going under Tools -> Web Store -> Admin Panel -> System -> Tasks. Ensure that your site loads at this point.
Run a check of your upgrade status by going to your store URL and adding /install.php?check to the end (for example, http://www.example.com/store/install.php?check). This will print a chart of system checks including required PHP libraries as well as folders that need writable access and 2.1 upgrade changes. You can refer back to this URL multiple times as you go through the upgrade process to ensure key steps have been completed.
If you have made customizations in the custom_includes folder, you can copy over this folder from your backup taken in step 1 to your web server at this point. Ensure that your site still loads after copying over these files. If your store does not load at this point, you may need to compare your customizations with the new source code to adjust it.
We have added three new template files which must appear with your other templates in the /templates/(yourname) folder. These templates are:
search_advanced.tpl.php
slider.tpl.php
promo_code.tpl.php
If you have a custom folder with your templates, you should copy these files from the deluxe template folder of the installer.
If you have modified the theme of your Web Store, you will need to additionally upgrade your templates using the Web Store 2.1 Template Upgrade Guide