Publishing the theme - XMPieLab/uStore-NG GitHub Wiki

After you've finished developing the theme, your next step is to create a theme package and upload it to the uStore server. After it is uploaded it can be assigned to a store.

To create a theme package follow these steps:

  1. Open the terminal and type:

    Ctrl-C (type y if needed to approve termination)

    npm run publish -- name=<themeName> displayName="<displayName>"

    Where the parameters are:

    themeName - The unique identifier of the theme. There can be only one theme with this name on the server. The theme name can contain only letters, digits and underscore, and it is limited to 20 characters.

    displayName - The theme name displayed in the Back Office in Theme Management window, and in the Store Setup > Appearance tab, when assigning it to a store. The display name can be any string.

    The Publish command creates a package with the given theme name. Ensure there are no errors in the terminal. A ZIP file with the new theme name is created under folder src/dist in the folder you've worked on to develop the theme. This is the theme package to upload.

    NOTE: If you've developed a new theme that hasn't yet been published on the server, use the Publish command to create the theme package. If you've developed a theme that has already been published on the server, and you wish to replace it with the one you've developed, use the Republish command with no parameters:

    npm run republish

    The Republish command creates a package with the same theme name in order to perform a replacement of the existing theme. Notice that XMPie out-of-the-box themes cannot be replaced, only custom themes uploaded by the customer.

  2. In the Back Office > "Theme Management" window, upload the theme package. Use the "New Theme" button to create a new theme or the "Replace" button to replace an existing theme.

Now that once the theme is published it can be assigned to a store. To do so you must place the store offline. If you are not the store administrator, ensure that you have permission to do so.

To assign a theme to a store do the following:

  1. In the Back Office, select the store to which you want to assign the theme.

  2. In Store setup > "Appearance" tab, select the required theme and then place the store online.

  3. Click the "Preview" button to see the store with its new UI.

Training video

For a detailed example, watch the Publishing your new Theme video on XMPie Campus.

⚠️ **GitHub.com Fallback** ⚠️