ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 20 - AD0-E718 discussion

Report
Export

An Adobe Commerce store owner sets up a custom customer attribute "my.attribute" (type int).

An Architect needs to display customer-specific content on the home page to Customers with "my.attribute" greater than 3. The website is running Full Page Cache.

Using best practices, which two steps should the Architect take to implement these requirements?

(Choose two.)

A.
Use customer-data JS library to retrieve "my.attribute" value
Answers
A.
Use customer-data JS library to retrieve "my.attribute" value
B.
Add a new context value of "my.attribute" to Magento\Framework\App\Http\Context
Answers
B.
Add a new context value of "my.attribute" to Magento\Framework\App\Http\Context
C.
Add a custom block and a phtml template with the content to the cmsjndexjndex.xml layout
Answers
C.
Add a custom block and a phtml template with the content to the cmsjndexjndex.xml layout
D.
Create a Customer Segment and use "my.attribute" in the conditions
Answers
D.
Create a Customer Segment and use "my.attribute" in the conditions
E.
Add a dynamic block with the content to the Home Page
Answers
E.
Add a dynamic block with the content to the Home Page
Suggested answer: A, C

Explanation:

https://docs.magento.com/user-guide/v2.3/stores/attributes-customer.htmldisplaying custom customer attributes on cached pages using best practices involves several steps,such as:

Creating a custom block and a phtml template with the content to display Adding the custom block to the layout file of the page where it should appear Creating a section.xml file to declare a new section for the custom attribute Creating a plugin for Magento\Customer\CustomerData\SectionPoolInterface to add the custom attribute value to the section data Using customer-data JS library to retrieve and display the custom attribute value in the phtml template

asked 02/10/2024
ALLIE SEBRONE MUHAMUBI
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first