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.)
To display additional content on the home page based on a custom customer attribute, the Architect needs to do the following steps:
Add a new context value of ''my_attribute'' to MagentoFrameworkAppHttpContext. This will allow the Full Page Cache to generate different versions of the page for customers with different values of ''my.attribute''. The context value can be set using a plugin on the MagentoCustomerModelContext class.
Add a dynamic block with the content to the Home Page. A dynamic block is a type of content block that can be configured to display only to specific customer segments or conditions. The Architect can use the 'my.attribute' in the conditions of the dynamic block and assign it to the Home Page in the Content > Blocks section of the Admin Panel.Reference:
Private content | Magento 2 Developer Documentation
Dynamic Blocks | Adobe Commerce 2.3 User Guide - Magento
Devorah
19 days agoBenton
20 days agoTrinidad
23 days agoLeoma
8 hours agoArlette
11 days agoAdrianna
1 months agoKrissy
1 months agoFrancesco
1 months agoAriel
8 days agoCyril
13 days agoDerrick
18 days agoColette
26 days agoAnnelle
1 months agoFelix
2 months agoLera
15 days agoEvangelina
18 days agoBettina
19 days agoErin
1 months ago