QuestionQ5

Design and implement optimal solutions for Adobe Commerce to meet business needs

An Adobe Commerce store owner creates a custom customer attribute, my_attribute.

An Architect must show additional content on the home page only to customers whose my_attribute has a specified value; the content must be identical for all such customers. The website uses 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 Magento\Framework\App\Http\Context
  • 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
Explanation

Customer Segments can target registered customers using customer-account attributes, provided the attribute is enabled for use in customer-segment conditions. A Dynamic Block can be associated with that segment to determine which customers see its content, and it can be inserted into the home page through Page Builder. This provides the required targeted, shared content without custom cache-context or JavaScript implementation.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!