With simplicity in mind, which two steps should the Architect take to implement these requirements?

An Adobe Commerce store owner sets up a custom customer attribute "my.attribute".

An Architect needs to display additional content on the home page, which should display only to Customers with "my.attribute" of a certain value and be the same content for all of them. The website is running Full Page Cache.

With simplicity in mind, which two steps should the Architect take to implement these requirements? (Choose two.)
A . Add a new context value of "my_attribute" to MagentoFrameworkAppHttpContext
B . Create a Customer Segment and use ‘my.attribute’ in the conditions
C . Add a custom block and a pHTML template with the content to the cmsjndexjndex.xml layout
D . Add a dynamic block with the content to the Home Page
E . Use customer-data JS library to retrieve "my.attribute" value

Answer: AE

Explanation:

When dealing with custom customer attributes and full page cache in Adobe Commerce, it’s important to use a method that allows for dynamic content to be shown to customers based on their attributes while still benefiting from the full page cache. Based on the options provided, here are the steps the Architect should take:

Add a new context value of "my_attribute" to MagentoFrameworkAppHttpContext. By adding a new context value, the full page cache will vary depending on this attribute, and Magento will serve different cached content based on the value of "my.attribute".

Use the customer-data JS library to retrieve "my.attribute" value. This library is designed to work with Magento’s full page cache, allowing for sections of the page to be updated dynamically with data specific to the current customer. It would allow the custom content to be displayed only to customers with the specific attribute value, without disabling the cache for the whole page.

Therefore, the best steps to take with simplicity in mind are A and E, which together will allow dynamic content to be displayed to logged-in customers based on their custom attribute while still taking advantage of the full page cache.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments