How toDesign Pack

Design Pack

Sana Commerce 9.0
Your connector

Create a Design Pack

To create a design package:

Step 1: Open NuGet Package Explorer.

You can download the tool and read the manual on how to install and use it on the official NuGet web site.

Step 2: Select Create a new package.

Step 3: Click: Edit > Edit Metadata.

Step 4: Enter package metadata.

The table below provides the description of required fields.

Package metadata fields Description
Id Enter the package ID. This ID is used as the design package name and is shown in Sana Admin.
Version Enter the package version.

  If you update the existing package you should increase the package version. The package version is automatically included in the package name. The package version allows to track the changes made in the design pack.

Authors Enter the authors of the package.
Description Enter the package description.

When you upload the design pack in Sana Admin, information from the package metadata fields listed in the table above will be shown on the Design packs page.

Step 5: Save package metadata.

Step 6: Right-click in the Package contents window and select Add Content Folder. The content folder will be created in the root of the design package directory. Inside this folder you can create any other folders that correspond to the Sana Commerce frontend directory hierarchy and add there any page/store views, CSS files, JavaScript files, images and icons. For more information, see the previous article.

Step 7: Add the 'sanamanifest.xml' file to the root of the design package.

Step 8: When the package is created save it: File > Save.

Now you can upload the package and apply the page and/or store layouts stored in the design package to your webstore. In Sana Admin click: Setup > Design > Design packs. For more information, see 'Design'.

     In case you have a design pack which is already in use and you want to change something in it or create a new one based on it, you can encounter a problem if the version of the NuGet Package Explorer which you are using to change the design pack differs from the version which was used to create the source package. In this case you will not be able to upload the new design pack into Sana Admin. In the 'tracelog' file the error will be recorded informing that the schema version of the design pack is incompatible with the version of NuGet.

To be able to upload a new design pack into Sana Admin which was changed, you should make sure that the URL in the *.nuspec file is the same in the source design pack and in the new one. Extract the contents of the design pack. It can be extracted just like any archive. Open the *.nuspec file in any text editor, for example 'Notepad'. There you will see the URL, for example:

<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">

This URL should be the same in the *.nuspec file of the source package and the one which you create.

How toDesign Pack