-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a documentation example for adding an attribute to a family.
Showing
4 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[comment]: <> (This file is auto-generated based on example-provider.) | ||
# Add attributes to families | ||
|
||
**Task:** add an attribute to families. | ||
|
||
### Rules | ||
|
||
```yaml | ||
actions: | ||
- | ||
type: add | ||
field: attributes | ||
items: | ||
- colour | ||
``` | ||
### Result | ||
Field: `attributes` | ||
|
||
Before applying actions: <pre>sku, name, description</pre> | ||
|
||
After applying actions: <pre>sku, name, description, colour</pre> | ||
**Task:** add an attribute to families and set it as required for the channel `ecommerce`. | ||
|
||
### Rules | ||
|
||
```yaml | ||
actions: | ||
- | ||
type: add | ||
field: attributes | ||
items: | ||
- colour | ||
- | ||
type: add | ||
field: attribute_requirements | ||
items: | ||
ecommerce: [colour] | ||
``` | ||
|
||
### Result | ||
|
||
Field: `attributes` | ||
|
||
Before applying actions: <pre>sku, name, description</pre> | ||
|
||
After applying actions: <pre>sku, name, description, colour</pre> | ||
Field: `attribute_requirements` | ||
|
||
Before applying actions: <pre>ecommerce: sku, name</pre> | ||
|
||
After applying actions: <pre>ecommerce: sku, name, colour</pre> |