Preparing an Add-on Package for the Marketplace

You can enable your customers to download your add-ons and upgrades directly from the Marketplace. This article describes how to make the add-on and upgrade packages and upload them to the Marketplace.

Preparing the Add-on Scheme

  1. Use Scheme 3.0 when you create the addon.xml file for you add-on.
  2. Follow Semantic Versioning when you specify the version of the add-on:
<version>1.1.0</version>
  1. If this version of the add-on is compatible only with CS-Cart or with Multi-Vendor, specify it in the <core_edition> element of the <compatibility> section.
  • CS-Cart:

    <compatibility>
       <core_edition>ULTIMATE</core_edition>
    </compatibility>
    
  • Multivendor:

    <compatibility>
       <core_edition>MULTIVENDOR</core_edition>
    </compatibility>
    

Important

If you don’t specify <core_edition>, the Marketplace will display compatible editions depending on what you specify in the Product field on the Features tab of the add-on editing page.

  1. Please do set the minimum and maximum supported versions of CS-Cart/Multi-Vendor in the <core_version> element of the <compatibility> section:
<compatibility>
   <core_version>
       <min>4.3.2</min>
       <max>4.3.6</max>
   </core_version>
</compatibility>

Preparing for Upgrade Distribution

  1. If you plan to distribute upgrades for the add-on via the Marketplace, add the marketplace_license_number setting to the add-on scheme:
<settings>
  <sections>
      <section id="general">
          <items>
              <item id="marketplace_license_number">
                  <type>input</type>
              </item>
          </items>
      </section>
  </sections>
</settings>
  1. Add the translation for marketplace_license_number to the add-on’s .po file:
msgctxt "SettingsOptions::sample_addon::marketplace_license_number"
msgid "Marketplace license number"
msgstr "Marketplace license number"

Building a Distribution Package

A distribution package is an archive that contains all the files of an add-on. This package can later be uploaded to the Marketplace. The customers then download the archive and install the add-on.

  1. Use cscart-sdk to export the files of the current version of the add-on:
$ cscart-sdk addon:export addon_name /path/to/addon_directory /path/to/cscart

Note

You can use addon:export and some other cscart-sdk commands to develop your addon in a separate repository.

  1. Go to the directory where the add-on was exported:
$ cd /path/to/addon_directory
  1. Create an archive:
$ tar -czf addon_name.tgz *

Uploading a Distribution Package to Marketplace

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

  2. Switch to the Features tab and update the Product, Compatible versions, and Localisations fields.

    If the package you’re uploading is compatible with the versions that are not specified here, add those versions in those fields.

  3. Click Save.

Specify the product, versions, and localisations on the add-on editing page.
  1. Switch to the Product packages tab.
  2. Click Upload package.
The Product Packages page has the list of all packages you uploaded to the Marketplace.
  1. Use the File field to select the archive you created.
  2. (Optional step) Enter the License agreement and Package description.
  3. Click Create.
You can specify the description and license agreement for the package.

The version of the uploaded package is taken from the <version> element of addon.xml. If you haven’t specified compatibility information in addon.xml, it will be taken from the Features tab.

If the Compatibility section of the newly uploaded package is empty, go to the Features tab and update the Product, Compatible versions, and Localisations fields, save your changes and reupload the add-on package.

You can edit the packages that you upload to the Marketplace.

Once you upload the distribution package, its addon.xml file will be checked for errors. If there are no errors, the package will appear on the Product packages tab. If the status of the package is Active, customers will be able to download it from the Marketplace.


Big CS-Cart Update is Here Experience the New Admin Panel with Dark Theme