Distributing Add-on Upgrades via the Marketplace

An upgrade package is an archive that contains all the files necessary to upgrade a customer’s add-on automatically. Normally this archive includes:

  • Files that were changed or added in the new version.
  • Files with the new language variables.
  • Validators that check conditions before installing the upgrade.
  • Migrations that change the structure and data of the database.

Upgrade packages can be installed in the Upgrade Center in one of the ways:

  • Specify the location of the upgrade package on a local machine or via a URL.
  • Retrieve the packages from the upgrade server with the Upgrade Center.

This article tells how add-on developers can create upgrade packages for their add-ons.

Build an Add-on Upgrade Package

Way 1. Build an Upgrade Package Manually

Step 1. Create the Upgrade Package

Create an upgrade package as described in this article. Most importantly, please follow the recommended structure of an add-on.

Starting with version 4.4.1, CS-Cart has a built-in Marketplace connector, so you don’t need to create your own upgrade connector and add it your add-on.

Important

If you need the Marketplace connector code for some reason, we described it in an earlier version of this article (version 4.3.x).

Step 2. Upload the Package to the Marketplace

  1. Open the add-on editing page on the Marketplace.

  2. Go to the Product packages tab.

  3. Click Upload upgrade.

    You can upload an upgrade package on the package list, which is available on the Product packages tab.
  4. Use the File field to select the archive you created.

  5. Specify the versions in the Upgrade from and Upgrade to fields.

  6. (Optional) Enter Package description.

  7. Click Create.

    When you upload an upgrade to the Marketplace,  you specify from and to which versions the add-on is upgraded.

Way 2. Build an Upgrade Package via the Marketplace

Important

To be able to build upgrade packages via the Marketplace, please follow the recommended structure of an add-on.

  1. Open the add-on editing page on the Marketplace.

  2. Switch to the Product packages tab.

  3. Click Build upgrade.

    Go to the Product packages tab and click Build upgrade.
  4. Specify the versions in the Upgrade from and Upgrade to fields.

  5. (Optional) Enter Package description.

  6. Click Create.

    Specify the properties of the upgrade package you're building.

View and Test Your Upgrade Packages

The list of upgrade packages is available on the Product packages tab of your add-on:

The list of packages includes add-on distribution and upgrade packages.

A manually-uploaded upgrade package has the Active status by default, i.e. it is available to customers. Upgrades built with the Marketplace have the Disabled status by default, i.e. they are not available to customers.

Customers who downloaded an add-on from the Marketplace, installed it, and specified the marketplace license number, will see the active upgrades in the Upgrade Center.

If you want to test a disabled upgrade package, add the following line to your store’s local_conf.php:

$config['resources']['marketplace_url'] .= '?access_token=/*your token here*/';

You’ll find the access token on your profile editing page in the Marketplace:

To test a disabled upgrade package, open the editing page of your profile on the Marketplace.