Import and export
Sets and skins move between shops — from a test shop to the live one, say — as JSON files. There are two screens of the same form:
- Filters → Filter sets → Import and export: a filter set or the shop defaults;
- Filters → Skins → Import and export: a skin or a channel’s adjustments of a skin.
Compatibility catalogues have their own import and export of nodes and fits: see Compatibility catalogues.
An import never changes the shop by itself: it always goes to a draft, and the shop changes once the draft is published in the builder or the skin editor.
Export
Section titled “Export”The Export card makes one file:
| Setting | Effect |
|---|---|
| Set / Skin | What goes into the file. The list of sets starts with the shop defaults; the list of skins ends with the channels’ adjustments. |
| Version | Published v…: the version the shop shows. Draft: the draft as it is now, with the number of its unpublished changes. A built-in skin has no draft to export. |
| Translations | Sets only: the texts in every language of the shop (group labels, help texts, units, range names). |
| Settings of the sources it uses (labels, ranges, units) | Sets only: the sources’ own settings go into the file too, for reference. |
Download JSON saves the file. Its name is the technical name with the version, for example outdoor-v4.json, or outdoor-draft.json for a draft.
A set’s file holds no assignments: another shop has other categories and channels. Assign the set after the import under Where sets show. A skin’s file holds the skin it stands on (by technical name) and only the values the skin sets itself.
Import
Section titled “Import”Import JSON… opens the import in three steps: File, Check, Import.
The file must be a JSON file exported by P2LabFilter, up to 2 MB. Its format and version are checked first, then its references and its differences to the draft. The step names what the file holds (set, shop defaults, skin or adjustments, its version, the number of groups or values, and when and from which shop it was exported).
A file of the wrong kind is refused: sets and the shop defaults are imported under Filter sets, skins and a channel’s adjustments under Skins. A file of another format version, or with settings this plugin version does not know, is refused with its reason; export it again from a shop with the same plugin version.
Import as decides where the file goes:
- New draft: a new set or skin. Give it a name; its Technical name follows from the name and must not be taken. Where the file’s name is taken already, the import suggests ”… (import)”.
- Overwrite draft ’…’: the draft of the set or skin with the file’s technical name is replaced by the file. The published version stays on the shop until the draft is published.
The shop defaults always overwrite the draft of the shop defaults. A channel’s adjustments go to the channel of the file’s domain or name; when no such channel is found, pick one under Adjustments for the channel. A channel with adjustments has their draft replaced; one without gets them as a new draft.
A skin stands on its parent skin. When the parent named in the file is not in this shop, pick the one it stands on under Stands on.
Differences lists every setting that changes, with its Place, the value In the draft now (or In this shop) and the value From the file. A search field narrows the list.
References in the file (sets only) lists the properties, property values, manufacturers, categories, landing pages, custom fields and icons the set names. Each is found by its ID, else by its name:
| State | Meaning |
|---|---|
| same ID | Found as it is. Custom fields and icons say same name. |
| matched by name (other ID) | Found under another ID; the import uses this shop’s. |
| not here | Missing: pick a replacement or leave it out. |
Leaving a reference out removes what depends on it, as the row says: the group, the tab of a composite filter, the group’s icon, its page condition, the property from the automatic groups, or the value from the group’s own order. The import starts only once every missing reference is decided; a property value can be decided only after its property.
Translations shows each language of the file and of this shop:
- a language of the file that this shop has is Imported;
- a language this shop does not have is Skipped;
- a language of this shop the file has no texts for is set to Leave empty (the shop shows the default language’s text) or Copy from … (the texts of the file’s first language, to translate later).
The step also warns where:
- a setting of the file has a value this shop does not take (not allowed, twice in the set, unknown): it is left out;
- a group showed only on pages this shop does not have: after the import it shows everywhere, so set its pages in the builder;
- the file holds the settings of sources: the import does not take them over, because sources apply to the whole shop at once. Set them under Sources.
Import
Section titled “Import”Import to the draft writes the draft. The last step says where it went:
- a new set is a draft without an assignment: check it in the builder, publish it and assign it;
- a new skin is a draft in no channel: check it in the skin editor, publish it and give it to a channel;
- an overwritten draft holds the file, and the shop shows the published version until the draft is published;
- a channel’s adjustments are a draft, and the channel looks the same until they are published in the skin editor.
Open in the builder (or Open in the skin editor, Open the shop defaults) leads to the draft; Import another file starts again.
See Filter sets and Skins for publishing.