Adobe Commerce Architect Master AD0-E718 Exam Practice Test

Page: 1 / 14
Total 50 questions
Question 1

In a custom module, an Architect wants to define a new xml configuration file. The module should be able to read all the xml configuration files declared in the system, merge them together, and use their values in PHP class.

Which two steps should the Architect make to meet this requirement? (Choose two.)



Answer : C, E

Based on web searches, it seems that Magento uses different classes and interfaces to interact with configuration files, such as Data, Reader, and Converter12.

According to the documentation1, Data is a class that provides access to configuration data using a scope. Reader is an interface that reads configuration data from XML files. Converter is an interface that converts XML data into an array representation.

Based on these definitions, I would say that two possible steps that the Architect should make to meet the requirement are:

1. Create a Data class that implements ''\Magento\Framework\Config\Data''

2. Make a Reader class that implements ''\Magento\Framework\Config\Reader\Filesystem''

These steps would allow the custom module to read all the XML configuration files declared in the system, merge them together, and use their values in PHP class.

The Architect should make two steps to meet this requirement: C) Create a Data class that implements ''\Magento\Framework\Config\Data''. This class will be responsible for reading and merging the custom xml configuration files and providing access to their values. The Data class should extend \Magento\Framework\Config\Data and use the constructor to inject the Reader class and the cache type. E) Make a Reader class that implements ''\Magento\Framework\Config\Reader\Filesystem''. This class will be responsible for loading and validating the custom xml configuration files from different modules. The Reader class should extend \Magento\Framework\Config\Reader\Filesystem and use the constructor to specify the file name, schema file, and validation state of the custom xml configuration files. Option A is incorrect because writing a plugin for \Magento\Framework\Config\Data::get() will not define a new xml configuration file, but rather modify the existing one. Option B is incorrect because appending the custom xml file name in ''Magento\Config\Model\Config\Structure\Reader'' in di.xml will not define a new xml configuration file, but rather add it to the system configuration structure. Option D is incorrect because injecting a ''reader'' dependency for ''Magento\Framework\Config\Data'' in di.xml will not define a new xml configuration file, but rather use an existing one. Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/XSD-XML-validation.html


Question 2

An Adobe Commerce Architect runs the PHP Mess Detector from the command-line interface using the coding standard provided with Adobe Commerce. The following output appears:

The Architect looks at the class and notices that the constructor has 15 parameters. Five of these parameters are scalars configuring the behavior of Kyservice.

How should the Architect fix the code so that it complies with the coding standard rule?



Question 3

A merchant asks for a new category attribute to allow uploading an additional mobile image against categories. The merchant utilizes the content staging and preview feature in Adobe Commerce and wants to schedule and review changes to this new mobile image field.

A developer creates the attribute via a data patch and adds it to view/adminhtml/ui_component/category_form.xml. The attribute appears against the category in the main form, but does not appear in the additional form when scheduled updates are made.

To change this attribute when scheduling new category updates, which additional action should the Architect ask the developer to take?



Answer : B

This is because, in order to change the attribute when scheduling new category updates, the attribute must be added to the view/adminhtml/ulcomponent/catalogstagingcategoryupdateform.xml file in order to be displayed in the additional form when scheduling updates. This additional form is used to set the values for the category attributes when scheduling updates.

To change the new category attribute when scheduling new category updates, you need to add the attribute to view/adminhtml/ui_component/catalogstaging_category_update_form.xml. This file defines the form fields that appear in the Schedule New Update form for categories.By adding the attribute to this file, you will be able to schedule and review changes to the new mobile image field using the content staging and preview feature in Adobe Commerce. Reference:1

1: https://docs.magento.com/user-guide/v2.3/cms/content-staging-category.html


Question 4

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.)



Answer : A, C

To display customer-specific content on the home page to Customers with ''my.attribute'' greater than 3, you need to use the following steps:

Use customer-data JS library to retrieve ''my.attribute'' value. The customer-data JS library allows you to access the customer data stored in the local storage of the browser. You can use the get() method to get the value of ''my.attribute'' for the current customer.

Add a new context value of ''my.attribute'' to Magento\Framework\App\Http\Context. The HTTP context is a mechanism that allows you to vary the cache of a page based on some parameters. By adding a new context value of ''my.attribute'', you can cache separate versions of the home page for customers with different values of ''my.attribute''.

Add a custom block and a phtml template with the content to the cms_index_index.xml layout. This step will create a block that will display the customer-specific content on the home page. You can use the phtml template to check the value of ''my.attribute'' and render the content accordingly.


: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/cache/page-caching/public-content.html : https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_customize.html

Question 5

An Adobe Commerce Architect designs a data flow that contains a new product type with its own custom pricing logic to meet a merchant requirement.

Which three developments are valid when reviewing the implementation? (Choose three.)



Answer : A, C, F

To create a new product type with its own custom pricing logic, you need to consider the following developments:

Content of the etc/product_types.xml file. This file will define the name, label, modelInstance, and priceModel of the new product type. The modelInstance will specify the custom type model that extends from the abstract Product Type model. The priceModel will specify the new price model that extends \Magento\Catalog\Model\Product\Type\Price.

Custom type model extended from the abstract Product Type model. This model will implement the logic and behavior of the new product type, such as how to prepare product for cart, how to process buy request, how to check product options, etc.

New price model extended \Magento\Catalog\Model\Product\Type\Price. This model will implement the custom pricing logic for the new product type, such as how to calculate final price, tier price, minimal price, etc.


1: https://meetanshi.com/blog/create-custom-product-type-in-magento-2/

Question 6

The development of an Adobe Commerce website is complete. The website is ready to be rolled out on the production environment.

An Architect designed the system to run in a distributed architecture made up of multiple backend webservers that process requests behind a Load Balancer.

After deploying the system and accessing the website for the first time, users cannot access the Customer Dashboard after logging in. The website keeps redirecting users to the sign-in page even though the users have successfully logged in. The Architect determines that the session is not being saved properly.

In the napp/etc/env.php\ the session is configured as follows:

What should the Architect do to correct this issue?



Answer : B

When using multiple backend servers behind a load balancer, the session data must be stored in a shared location that is accessible by all servers. Otherwise, the session data will be inconsistent and users may experience issues such as being logged out unexpectedly. Redis is a recommended option for storing session data in a distributed architecture, as it provides fast and reliable access to the data. The session host value in the env.php file must point to the Redis instance that is used for session storage. Reference: https://devdocs.magento.com/guides/v2.4/config-guide/redis/redis-session.html


Question 7

An Architect wants to create an Integration Test that does the following:

* Adds a product using a data fixture

* Executes $this->someLogic->execute($product) on the product

* Checks if the result is true.

Sthis->someLogic has the correct object assigned in the setup () method-Product creation and the tested logic must be executed in the context of two different store views with IDs of 3 and 4, which have been created and are available for the test.

How should the Architect meet these requirements?



Page:    1 / 14   
Total 50 questions