If you’re manually updating a live site, we recommend you follow these instructions to minimize the time your site is down:
- Backup your entire Craft database.
- Rename the plugins/commerce/ folder in the latest release zip to “commerce-new”.
- Upload plugins/commerce-new to the craft/plugins folder on your server, alongsite the old plugins/commerce folder.
- Once commerce-new folder is done uploading proceed to the next step.
- Rename the old craft/plugins/commerce folder to craft/plugins/commerce-old.
- Rename commerce-new to “commerce”.
- Point your browser to your Craft control panel. You will be prompted to proceed with a database update. Click “Finish up” and let the database updates run.
- If all is well, delete the commerce-old folder, otherwise restore this folder as "commerce" and restore your database from backup and contact support.
Upgrading from Market Commerce #
Craft Commerce is the successor to Market Commerce. To upgrade from Market Commerce to Craft Commerce, follow these instructions.
Before you perform the upgrade, make sure you are prepared.
- Ensure you are running Market 0.8.09. (Do NOT uninstall Market Commerce!)
- Ensure you are running Craft 2.5.2715 Beta or later.
- Backup your database.
To perform the upgrade, follow these instructions.
- Upload the ‘commerce’ folder to ‘craft/plugins’.
- Go to Settings → Plugins within the Control Panel.
- Click on the “Install” button beside “Craft Commerce”.
- Ensure that Craft Commerce is now installed, and Market Commerce is uninstalled.
- Delete your ‘craft/plugins/market’ folder.
Updating your Templates
Updating your front end templates for Craft Commerce should be as simple as performing a series of find-and-replace operations based on the following table:
|name="action" value="market/cart/setEmail"||name="action" value="commerce/cart/updateCart"|
|name="action" value="market/cartAddress/chooseAddresses"||name="action" value="commerce/cart/updateCart"|
|name="action" value="market/cart/setShippingMethod"||name="action" value="commerce/cart/updateCart"|
|name="action" value="market/cart/add"||name="action" value="commerce/cart/updateCart"|
|name="action" value="market/cart/remove"||name="action" value="commerce/cart/removeLineItem"|
|name="action" value="market/cart/removeAll"||name="action" value="commerce/cart/removeAllLineItems"|
|name="action" value="market/cart/applyCoupon"||name="action" value="commerce/cart/updateCart"|
product.implicitVariant, in all cases, has been replaced with a
product.defaultVariant, but there is no longer the need to check if the product type has multiple variants before accessing it. For non variant products, the first variant is always the default. For products with multiple variants, the variant selected with the ‘default’ toggle is the defaultVariant.