Documentation

Upgrading Liferay Commerce

To enhance the quality of your experience with Liferay Commerce, Liferay provides periodic product upgrades with bug fixes and new features. Users should consider regularly updating to the latest release.

Upgrading to Commerce 4.0

Starting with Liferay Commerce 3.0, Commerce is now bundled with Liferay DXP. To upgrade to Commerce 4.0, you must first upgrade your base Liferay DXP installation to DXP 7.4 and perform a search re-index.

Warning

After upgrading to 7.4, do not deploy the Commerce LPKG again. The Commerce 4.0 modules are bundled with 7.4. Deploying the LPKG causes conflicts.

To learn more about the DXP upgrade process, see Upgrade Basics. Once DXP is upgraded to 7.4, execute a re-index.

Prerequisite for Upgrading to Liferay Commerce 4.0

The CommerceCountry table is deprecated in Liferay Commerce 4.0 and is being replaced by the Country table. While the CommerceCountry table only required the name of the country, the Country table requires the name and the Alpha-2 (a2) and Alpha-3 (a3) code for each country.

The CommerceCountry table may be populated if you are using the Minium Accelerator or if you are using your own values. If you are not using the Minium Accelerator, the table can be empty. As a prerequisite before upgrading to Liferay DXP 7.4, you must ensure that each country in the CommerceCountry table has its ISO code pre-populated. See Country Codes (ISO) for more information.

The CommerceCountry table has more fields than the Country table.

Executing a Post-Upgrade Reindex

After upgrading to DXP 7.4, execute a full search re-index.

  1. Open the Global Menu, and go to Control PanelSearch.

    Go to Search in the Control Panel tab.

  2. Under the Index Actions tab, click Execute for Reindex all search indexes.

Once the reindex has finished, verify it was successful by going to CommerceProducts in the Global Menu and confirming that all products are displayed.

Upgrading to Commerce 3.0 from 2.1 and Below

To upgrade to Commerce 3.0, you must first upgrade your base Liferay DXP installation to DXP 7.3 and then execute a search re-index.

Warning

After upgrading to 7.3, do not deploy the Commerce LPKG again. The Commerce 3.0 modules are bundled with 7.3. Deploying the LPKG causes conflicts.

Executing a Post-Upgrade Reindex

After upgrading to DXP 7.3, execute a full search re-index.

  1. Open the Global Menu and go to Control PanelSearch.

    Go to Search in the Control Panel tab.

  2. Under the Index Actions tab, click on Execute for Reindex all search indexes.

Once the reindex has finished, verify it was successful by going to CommerceProducts in the Global Menu and confirming that all products are displayed.

Upgrading to Commerce 2.1.x

Liferay Commerce provides a seamless upgrade process to Commerce 2.1.x, whether from version 1.1.x or 2.0.x.

Note

Upgrading from 1.1.x to 2.1.x does not require an incremental upgrade to 2.0.x.

Before upgrading to Commerce 2.1.x, you must first be running the latest fix pack of Liferay DXP 7.2. For example, if upgrading to Liferay Commerce Enterprise 2.0.6 - upgrading Liferay DXP to Fix Pack 14 is required. To learn about upgrading to DXP 7.2, see Upgrade Basics.

Apply the Latest Fix Pack

Subscription Required

Liferay provides the latest fix pack releases for download at the Help Center. Once downloaded, you can apply the fix pack using the Liferay Patching Tool. See Installing Patches for more information.

If Liferay DXP was installed manually (for example, on WebLogic), see Installing Patches on the Liferay DXP 7.1 WAR.

Then, follow these step to verify the fix pack was successfully installed:

  1. Navigate to the ${liferay.home}/patching-tool folder.

  2. Verify that the fix pack has been applied by executing the following:

    • Linux/Unix: ./patching-tool.sh info

    • Windows: patching-tool info

    Detailed patch list:
       [ -] dxp-12-7110 :: Currently not installed; Won't be installed: dxp-14 contains the fixes included in this one :: Built for LIFERAY
       [*I] dxp-14-7110 :: Installed; Will be installed. :: Built for LIFERAY
    

Fix Packs are cumulative in nature and include all previously release fix packs. After patching, remove Liferay DXP’s cache of deployed code by deleting the contents of the ${liferay.home}/work folder. See the next section on how to remove other stale data.

Download and Deploy

Once you’re running the latest fix pack of DXP 7.2, follow these steps to upgrade to Commerce 2.1.x upgrade Commerce.

  1. Download the latest Liferay Commerce.

  2. Deploy the LPKG to the ${liferay.home}/deploy folder.To learn more about deploying applications to Liferay DXP, see Installing Apps.

  3. Verify that the messages similar to those shown below appear in the application server console:

    Processing Liferay Commerce Enterprise x.x.x.lpkg
    
    The portal instance needs to be restarted to complete the installation of file:/../../liferay-commerce-enterprise-1.1.6/osgi/marketplace/Liferay%20Commerce%20-%20API.lpkg
    
    The portal instance needs to be restarted to complete the installation of file:/../../liferay-commerce-enterprise-1.1.6/osgi/marketplace/Liferay%20Commerce%20-%20Impl.lpkg
    
  4. Shut down the application server.

Clear Stale Data and Verify the Upgrade Process

  1. Delete the ${liferay.home}/osgi/state folder. To learn more about OSGi folders, see Installing Apps.

  2. Start the application server.

  3. Verify that the the upgrade process has begun by looking for messages similar to this in your application server console logs:

    Upgrading com.liferay.commerce.account.internal.upgrade.v1_2_0.CommerceAccountGroupCommerceAccountRelUpgradeProcess
    Completed upgrade process com.liferay.commerce.account.internal.upgrade.v1_2_0.CommerceAccountGroupCommerceAccountRelUpgradeProcess in 24 ms
    Upgrading com.liferay.commerce.account.internal.upgrade.v1_2_0.CommerceAccountGroupRelUpgradeProcess
    Completed upgrade process com.liferay.commerce.account.internal.upgrade.v1_2_0.CommerceAccountGroupRelUpgradeProcess in 8 ms
    Upgrading com.liferay.commerce.account.internal.upgrade.v1_2_0.CommerceAccountGroupUpgradeProcess
    Completed upgrade process com.liferay.commerce.account.internal.upgrade.v1_2_0.CommerceAccountGroupUpgradeProcess in 12 ms
    Upgrading com.liferay.commerce.account.internal.upgrade.v1_3_0.CommerceAccountNameUpgradeProcess
    Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
    Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 40 ms
    Completed upgrade process com.liferay.commerce.account.internal.upgrade.v1_3_0.CommerceAccountNameUpgradeProcess in 60 ms
    Starting com.liferay.portal.upgrade.internal.index.updater.IndexUpdaterUtil#updateIndexes#Updating database indexes for com.liferay.commerce.account.service
    Dropping stale indexes
    Adding indexes
    
    Verifying com.liferay.commerce.product.internal.verify.CommerceCatalogServiceVerifyProcess
    Starting com.liferay.commerce.product.internal.verify.CommerceCatalogServiceVerifyProcess#verifyMasterCommerceCatalog
    Completed com.liferay.commerce.product.internal.verify.CommerceCatalogServiceVerifyProcess#verifyMasterCommerceCatalog in 2 ms
    Completed verification process com.liferay.commerce.product.internal.verify.CommerceCatalogServiceVerifyProcess in 7 ms
    1 theme for admin-theme is available for use
    1 theme for classic-theme is available for use
    1 theme for minium-theme is available for use
    

The Liferay Commerce instance has been upgraded.

Execute Post-Upgrade Reindex

Liferay Commerce 2.1 and Below

After upgrading from to the latest version, execute a full search reindex.

To execute a search reindex:

  1. Navigate to the Control PanelConfigurationSearch.

  2. Click Execute next to Reindex all search indexes.

  3. Wait for the reindex to finish.

  4. Navigate to the Control PanelCommerceProducts.

  5. Verify all the products are displayed again.

Once reindexing is complete, the upgraded Liferay Commerce instance is ready for use.