Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 243ad7a

Browse files
Apply suggestions from code review
Co-authored-by: Misha <misha.kotov@gmail.com>
1 parent 43ffb21 commit 243ad7a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/recommendations/customize.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ When you [create a recommendation]({{ site.user_guide_url }}/marketing/create-ne
9797
9898
Refer to [layout overview]({{ site.gdeurl }}/frontend-dev-guide/layouts/layout-overview.html) for more information about the types of blocks on the page.
9999
100-
## Product attributes
100+
## Custom Product attributes
101101
102-
If you want to draw attention to certain products in a recommendation unit, you can fetch and render any custom product attributes you have defined in the Admin. For example, you can apply a badge in a recommendation unit to indicate a product is on sale:
102+
Often developers need access to custom product attribute values in recommendations units on storefront so that they can add visual treatments to products based on those attributes.
103+
104+
For example, if your store sells some organic products, you might have a custom attribute on those products designating them as "Organic = true". You may need access to this attribute value on the storefront so that you can give these products special visual treatment when they appear in Recommendations. Similarly, access to these custom product attribute values allows you to badge products or drive custom logic in the presentation layer of your site.
103105
104106
![Add Badge]({{ page.baseurl }}/recommendations/images/unit.png)
105107
106108
To make sure a custom product attribute in available when you render the recommendation unit on the page, set the `Used in Product Listing` property to `Yes` in the [Product Attributes](https://docs.magento.com/user-guide/stores/attribute-product-create.html#step-4-describe-the-storefront-properties) page in the Admin.
107109
108-
When this property is set, that custom product attribute is included in the JSON payload when the recommendations service fetches the product data. You can then apply your storefront stylings so that attribute is applied to the product.
110+
When this property is set, that custom product attribute value is included in the JSON payload when the recommendations service fetches the product metadata. You can then apply custom storefront styling based on this attribute value.

0 commit comments

Comments
 (0)