Plugins: using and publishing

Interaction with the marketplace is essential for plugin users and developers. This is a guide on publishing and installing extensions.

As of v3, ScandiPWA supports frontend plugins - reusable extensions that once created can be used in any project utilizing ScandiPWA v3. These can be used to modify the functionality of almost any part of ScandiPWA.

Valid extension definition

  1. Is a valid M2 package.

  2. All of its M2-related directories must be located in its root, otherwise these contents are not going to be recognized by M2. The scandipwa directory, if present, should be nested into an src directory in the extension's root.

  3. If it contains any frontend functionality - the src/scandipwa directory with corresponding contents should be present.

  4. If it contains any node dependencies - there must be a package.json file with all of the dependencies neighboring the composer.json

  5. Should follow the guidelines described in the plugin development guide

  6. Should have a definitive installation and configuration guide in or a reference to one (either within the archive or online).

Uploading an extension to the marketplace

  1. Implement an extension!

  2. Create an empty app directory and a code directory inside of it.

  3. Place your extension (M2 module) inside of the code directory mentioned above.

  4. Archive your extension - call the archive <vendor>--<name> <version> for ScandiPWA <supported version(s)>. All the letters in the archive name are going to get converted to the lowercase by the marketplace.

  5. See that your extension is installable following the guide beneath.

  6. Follow the guide on the marketplace to create an account and submit your extension. All the other details regarding this process can be found there.

Installing an extension

  1. Download the desired extension from the marketplace

  2. Unzip it, see the app/code/<vendor>/<extension> like file structure inside.

  3. Merge the app folder you unpacked from the extension with the app directory of your Magento 2 instance.

  4. Run magento se:up command so that the module is registered in the Magento. Check whether your module is installed properly with magento mo:st

  5. Go to the app/design/frontend/<vendor>/<theme> - your ScandiPWA installation directory. There, add "<name>": "app/code/<vendor>/<theme>" to the "extensions" block of the scandipwa.json file.

  6. Follow any additional instructions provided in the file.

  7. Recompile the theme, flush caches if necessary.

Last updated