ScandiPWA
Create Magento AppCreate ScandiPWA AppUser ManualGitHub
  • Why Scandi
  • πŸš€Quick-start Guide
  • πŸ—ΊοΈRoadmap
  • Introduction to the Stack
    • CMA, CSA, and ScandiPWA
    • Challenges
  • Setting up Scandi
    • Storefront Mode Setup
      • Proxying requests to server
    • Magento Mode Setup
    • Existing Magento 2 setup
    • Magento Commerce Cloud setup
    • Updating to new releases
      • Storefront mode upgrade
      • Magento mode upgrade
      • CMA upgrade
      • CSA upgrade
      • Custom ScandiPWA composer dependency update
      • Local ScandiPWA Composer Package Setup
    • Docker Setup [deprecated]
      • Legacy Docker setup
      • Migrating to CMA & CSA
  • Developing with Scandi
    • Override Mechanism
      • Overriding JavaScript
        • Overriding classes
        • Overriding non-classes
      • Overriding Styles
      • Overriding the HTML / PHP
      • Parent Themes
    • Extensions
      • Creating an extension
      • Installing an extension
      • Migrating from 3.x to 4.x
      • Publishing an extension
      • Extension Terminology
    • Working With Magento
      • Magento troubleshooting
      • Working with Magento modules
      • Working with GraphQL
      • GraphQL Security
      • Working with "granular cache"
    • Developer Tools
      • Debugging in VSCode
      • ScandiPWA CLI
      • Configuring ESLint
      • CSA Commands
    • Deploying Your App
      • Build & Deploy Android app
      • Build & Deploy iOS app
  • Structure
    • Directory Structure
    • Building Blocks
      • Components
        • Styling Components
      • Routes
      • Redux Stores
      • GraphQL Queries
      • Global Styles
      • The Util Directory
      • Type Checking
    • Application assets
    • Code Style
      • JavaScript Code Style
      • SCSS Code Style
  • Tutorials
    • Customizing Your Theme
      • Styling
        • Customizing the Global Styles
        • Adding a New Font
        • Overriding a Components Styles
        • Extending a Component's Styles
      • Customizing JavaScript
        • Customizing the Footer Copyright
        • Adding a New Page
        • Adding a Section in My Account
        • Adding a Tab on the Product Page
        • Creating a New Redux Store
    • Payment Method Integration
      • Setting Up for Development
      • Redirecting to the Payment Provider
      • Handling the Customer's Return
    • Creating a Custom Widget
      • Scandi CMS System Overview
      • Creating a Magento Widget
      • Implementing the Rendering
    • Video Tutorials
      • #1 Setting up and talking theory
      • #2 Templating in React
      • #3 Overriding a file
      • #4 Styling the application
      • #5 Patterns of ScandiPWA
    • Dark Mode Extension
    • Deploying Native Apps
    • Product 3D Model Extension
      • Part 1: Magento 3D Model Uploads
      • Part 2: GraphQL API
      • Part 3: Scandi Frontend
    • Social Share, Full Extension Development
      • STEP-1 and 2 Creating Magento 2 Module
      • STEP-3 Backend Configurations Settings
      • STEP-4 Simple GraphQl and Resolver
      • STEP-5 Creating Extension, Base Redux Store
      • STEP-6 Extension plugins
      • STEP-7 GraphQL types, Helpers
      • STEP-8 Query Field and FieldList
      • STEP-9 render Plugins and MSTP Plugin, Component creation
      • STEP-10 SocialShare Component Development
      • STEP-11 SocialShare for CategoryPage
      • TASK-1 Changing LinkedIn to Twitter
      • STEP-12 Comments for Admin Users
      • STEP-13 Final, bugfixes
    • Accessing Magento 2 Controllers
      • STEP-1 Creating Magento 2 Module
      • STEP-2 - Create Magento 2 Frontend Route and Basic Controller
      • STEP-3 Accessing Magento 2 Controller, Bypassing ScandiPWA frontend
      • STEP-4 Creating ScandiPWA Extension with additional dependencies
      • STEP-5 Creating Plugin and Axios request
  • About
    • Support
    • Release notes
    • Technical Information
    • Data Analytics
    • Contributing
      • Installation from Fork
      • Repository structure
      • Code contribution process
      • Submitting an Issue
      • Publishing ScandiPWA
Powered by GitBook
On this page
  • Install from a local source
  • Install with a package manager (beta)
  • Enable the extension
  • Install by using scandipwa-cli

Was this helpful?

  1. Developing with Scandi
  2. Extensions

Installing an extension

PreviousCreating an extensionNextMigrating from 3.x to 4.x

Last updated 3 years ago

Was this helpful?

ScandiPWA setup considers having the back-end (Magento 2 Module) and front-end (ScandiPWA Extensions) of your application completely separated. If you are looking for back-end part instructions, refer to the link below.

Install from a local source

Note: The following instructions are valid for ScandiPWA 4.x For 5.x, please go to https://marketplace.scandipwa.com/extension-manual-installation-guide

  1. Download the archive containing the FE part of the extension from the marketplace.

  2. Create a packages/ directory inside of your theme's root.

  3. Put the archive's contents inside of the packages/<package name> directory. Make sure that you have a packages/<package name>/package.json file present alongside all the other extension's contents, that means that you have unpacked the extension correctly. Note: <package name> can also include publisher, @scandipwa/paypal is a valid package name.

  4. Add the following scripts to the scripts section of your theme's package.json file. This is necessary for your package to be symlinked into the node_modules directory of your theme after manipulations with dependencies

    {
        "scripts": {
            "postinstall": "scandipwa-scripts link",
            "postupdate": "scandipwa-scripts link"
        }
    }
  5. Add the extension to the dependencies of your theme, as follows:

    {
        "dependencies": {
            "<package name>": "file:packages/<package name>"
        }
    }
  6. Update the symlinks by running the following command

    # For yarn users
    yarn postinstall
    
    # For npm users
    npm run postinstall

Install with a package manager (beta)

Some of the FE ScandiPWA extensions are available for installation using npm and yarn.

The process is different from the regular module's installation, the ScandiPWA packages are stored in our own registry - r.scandipwa.com

The installation process is the following:

  1. Configure the token for your project

    2.1. Create an .npmrc file inside of your project's root directory, neighboring to the package.json file. The .npmrc file should be created even if you are using yarn.

    2.2. Put your token in there in the following format:

    TOKEN=put.token.here
    //r.scandipwa.com/:_authToken=$TOKEN
  2. Add the desired package to your project's dependencies (and fetch it)

    # Write a full command
    yarn --registry https://r.scandipwa.com add <package>
    npm --registry https://r.scandipwa.com i <package>
    
    # Or create an alias
    alias yr='yarn --registry https://r.scandipwa.com'
    alias npr='npm --registry https://r.scandipwa.com'
    
    # and use it
    yr add <package>
    npr i <package>
  3. When installing your project's dependencies, don't worry about any additional actions. The yarn.lock or package-lock.json will contain all the necessary data

    # For yarn users
    yarn
    
    # For npm users
    npm ci

Enable the extension

Turn on the extension in your theme's package.json file. You may turn it off by changing true to false in the corresponding extensions block's entry.

    {
        "scandipwa": {
            "extensions": {
                "<package name>": true
            }
        }
    }

Install by using scandipwa-cli

Currently, it is possible to install the extensions published to npm with the scandipwa-cli package, by using scandipwa extension install command.

It is planned to provide support for installing local extensions in the future.

Get the (token) from the

More information about installing via scandipwa-cli from npm registry see .

credentials
marketplace
here
Working with Magento modules
Enable the extension
Enable the extension