In this post we will learn:
What is it used for?
The rule is used to clean up data from the feed, specifically to remove parameter values. Individual values or all values can be removed at once. Both are possible. It depends on what we click in the rule.
How does the Remove Parameter Values rule work?
In this section, we will describe how the rule works, what it can do, and what to watch out for.
Basic principle
The rule is intuitive - it removes the listed values, or all values, and the parameter names associated with them, from the output feed.
Before:
<PARAM>
<PARAM_NAME>Color</PARAM_NAME>
<VAL>black</VAL>
</PARAM>
<PARAM>
<PARAM_NAME>Color</PARAM_NAME>
<VAL>green</VAL>
</PARAM>
<PARAM>
<PARAM_NAME>Color</PARAM_NAME>
<VAL>yellow</VAL>
</PARAM>
<PARAM>
<PARAM_NAME>Material</PARAM_NAME>
<VAL>cotton</VAL>
</PARAM>
<PARAM>
<PARAM_NAME>Material</PARAM_NAME>
<VAL>elastane</VAL>
</PARAM>
Rule:
After regeneration:
<PARAM>
<PARAM_NAME>Color</PARAM_NAME>
<VAL>yellow</VAL>
</PARAM>
In case one parameter name has multiple values like siblings elements, only the values are removed and the parameter name is kept (as long as it has a value left):
Before:
<PARAM>
<PARAM_NAME>Color</PARAM_NAME>
<VAL>black</VAL>
<VAL>green</VAL>
<VAL>yellow</VAL>
</PARAM>
Rule:
After regeneration:
<PARAM>
<PARAM_NAME>Color</PARAM_NAME>
<VAL>black</VAL>
<VAL>yellow</VAL>
</PARAM>
The rule is available “only” for projects with an output format that has parameters in the specification
Which makes sense. Furthermore, the rule is available even for projects with a custom format on the output, which has parameters mapped in the settings of the given custom format.
What else does the Remove parameter values rule form offer?
The rule form offers several functions that make our work easier:
-
The names and values of the parameters are whispered. So we don’t have to write everything unnecessarily. Just click on the given things.
-
smart insert works in forms. If we have the names and values of the parameters listed in the table, we can simply copy them, check the Smart Insert Mode box, and then paste them into the form.
-
For projects with an output format that has multiple parameter types in the specification, it is necessary to select in the form which type of parameters we want to work with.
In the case of variants, we can also add our own condition to the path in order to target the specific variants we require.
Usage examples
We will show several examples of using the Delete parameter values rule on Glami and Shoptet formats.
Glami
Example 1: We will remove the values other and silicone of the Material parameter.
After regeneration, we will no longer see the given value in the output feed.
Shoptet
Example 2: We will remove all values of the parameters Fit and Number of layers. This is a parameter type TEXT_PROPERTY
.
Example 3: We will remove the value White of the parameter Color for all variants.
Example 4: We will remove the value White of the parameter Color only for variants with the value of attribute @id
46 and 64.
Summary
- What is it used for?
The rule is used to remove parameter values. Individual values or all values can be removed at once.
- How does the rule work?
The rule is intuitive - it removes the listed values, or all values, and the parameter names associated with them from the output feed.