What should be the next step?

An Architect is investigating a merchant’s Adobe Commerce production environment where all customer session data is randomly being lost. Customer session data has been configured to be persisted using Redis, as are all caches (except full page cache, which is handled via Varnish).

After an initial review, the Architect is able to replicate the loss of customer session data by flushing the Magento cache storage, either via the Adobe Commerce Admin Panel or running bin/iuagento cache: flush on the command line. Refreshing all the caches in the Adobe Commerce Admin Panel or running bin/magento cache: clean on the command line does not cause session data to be lost.

What should be the next step?
A . Educate the merchant to not flush cache storage and only refresh the caches in future.
B. Set the ‘Stores > Configuration’ option for "Store Session Data Separately’ to ‘Yes’ in the Adobe Commerce Admin Panel.
C. Check app/etc/evn.php and make sure that the Redis configuration for caches and session data use different database numbers.

Answer: C

Explanation:

This is because when the Magento cache storage is flushed, all caches and session data stored in Redis are cleared. To prevent session data from being lost when caches are flushed, the merchant should configure different Redis databases for caches and session data, so that flushing the Magento cache storage only clears the caches and not the session data.

Which solution should the Architect recommend?

While reviewing a newly developed pull request that refactors multiple custom payment methods, the Architect notices multiple classes that depend on MagentoFrameworkEncryptionEncryptorInterf ace to decrypt credentials for sensitive data.

The code that is commonly repeated is as follows:

In each module, the user_secret config is declared as follows:

The Architect needs to recommend an optimal solution to avoid redundant dependency and duplicate code among the methods.

Which solution should the Architect recommend?
A . Replace all VendorPaymentModuleGatewayConfigConfig Classes With virtualTyp- Of
MagentoPayxer.tGatewayConflgConfig and Set <user_secret
backend_Model="MagentoConfigModelConfigBackendEncrypted" /> under ccnfig.xml
B. Add a plugin after the getvalue method of $sccpeConfig, remove the $encryptor from
dependency and use it in the plugin to decrypt the value if the config name is ‘user.secret?
C. Create a common config service class vendorPaymentGatewayconfigConfig under
Vendor.Payment and use it as a parent class for all of the Vender
EaymentModuleGatewayConfigConfig Classes and remove $sccpeConfig and
$encryptor dependencies

Answer: A

Which two options should the Architect consider to meet these requirements?

An Adobe Commerce Architect needs to scope a bespoke news section for a merchant’s Adobe Commerce storefront. The merchant’s SEO agency requests that the following URL

structure:

news/{date}/{article_url_key}l where {date} is the publication date of the article, and {article_url_key} is the URL key of the article.

The Architect scopes that a news entity type will be created. The date and URL key data will be stored against each record and autogenerated on save. The values will be able to be manually overridden.

The Architect needs to manage routing this functionality and adhere to best practice.

Which two options should the Architect consider to meet these requirements? (Choose two.)

A. Create a standard controller route and an Index/Index index controller class that loads the relevant news article by matching the URL date and URL key parts.

B. Create an observer that listens to the controllers_front_send_response_before event, looks for the mm portion of the URL, and If it matches, loads the relevant news article by matching the URL date and URL key parts.

C. Create a plugin that intercepts lu^jentoXFraBeworkUppXActien::executed, looks for the news portion of the URL and if it matches, loads the relevant news article by matching the URL date and URL key parts.

D. Create a standard controller route and mapping the internal URLs (such as news/article/view/id/1) to rewrites that are generated on save and then stored in the URL rewrites table.

E. Create a custom router that runs before the standard router and matches the news portion of the URL. then looks for and loads a news article by matching the date and URL key parts of the URL.

Answer: D,E

Explanation:

creating a custom router involves several steps, such as:

✑ Creating a routes.xml file to declare a custom route ID and front name

✑ Creating a Router.php file to define the custom router class that extends

MagentoFrameworkAppRouterBase

✑ Creating an etc/di.xml file to register the custom router class with a specific sortOrder

✑ Creating controller classes and action methods to handle the requests Based on these steps, I would say that two possible options that the Architect should consider to meet these requirements are:

✑ A. Create a standard controller route and an Index/Index index controller class that loads the relevant news article by matching the URL date and URL key parts.

✑ E. Create a custom router that runs before the standard router and matches the news portion of the URL, then looks for and loads a news article by matching the date and URL key parts of the URL.

What prevented the value type of field my_attribute from changing?

An external system integrates functionality of a product catalog search using Adobe Commerce GraphQL API. The Architect creates a new attribute my_attribute in the admin panel with frontend type select.

Later, the Architect sees that Productinterface already has the field my_atcribute, but returns an mc value. The Architect wants this field to be a new type that contains both option id and label.

To meet this requirement, an Adobe Commerce Architect creates a new module and file etc/schema.graphqls that declares as follows:

After calling command setup:upgrade, the introspection of Productlnterface field xy_attribute remains int.

What prevented the value type of field my_attribute from changing?
A . The fields of Productlnterface are checked during processing schema.graphqls files. If
they have a corresponding attribute, then the backendjype of product attribute is set for field type.
B. The interface Productlnterface is already declared in Magento.CatalogGraphQI module. Extending requires use of the keyword -xceni before a new declaration of Productlnterface.
C. The Magento.CatalogGraphQI module occurs later in sequence than the Magento.GraphQI module and merging output of dynamic attributes schema reader overrides types declared in schema.graphqls

Answer: C

Explanation:

products query is a GraphQL query that returns information about products that match specified search criteria. It also shows how to use ProductInterface fields to retrieve product data.

https://devdocs.magento.com/guides/v2.3/graphql/queries/products.html

What should be added to set the customer attribute correctly?

A merchant is utilizing an out-of-the-box Adobe Commerce application and asks to add a new reward card functionality for customers. During the code review, the Adobe Commerce Architect notices the reward_card_number attribute setup created for this functionality is causing the customer attribute to be unavailable in the My account/My rewards page template.

What should be added to set the customer attribute correctly?
A . scope property should be added with a value of global
B. group property should be added with a value of 1
C. system property should be added with a value of true

Answer: B

How should the Architect make sure that test configuration data is added to test methods according to best practices?

An Adobe Commerce Architect creates a new functionality called Customs Fee, which adds a new total that applies to additional costs for handling customs clearance expenses. The extension allows specifying fee value for every website separately via the Adobe Commerce Configuration System.

The Architect plans to cover new functionality with integration tests. One test case needs to confirm if the total is calculated correctly on different websites.

How should the Architect make sure that test configuration data is added to test methods according to best practices?
A . Override setuo () method, receive instance of MagentoTestFrameworkAppconfig, and specify value via setValue () method
B. Specify @magentoconfigFixture annotations for the test methods in PHPDoc
C. Create a fixture file to configure Adobe Commerce and specify it in test method PHPDoc using the @magentoconfigFixture annotation

Answer: C

Which solution should be used to meet this requirement?

An Adobe Commerce Architect needs to log the result of a ServiceClass : : ge-Dara method execution after all plugins have executed. The method is public, and there are a few plugins declared for this method. Among those plugins are after and around types, and all have sortOrder specified.

Which solution should be used to meet this requirement?
A . Declare a new plugin with the sortOrder value higher than the highest declared plugin sortOrder and implement afterGetData method.
B. Declare a new plugin with the sortOrder value lower than the lowest declared plugin sortOrder and implement aroundGetData method
C. Declare a new plugin with the sortOrder value higher than the highest declared plugin sortOrder and implement aroundGetData method

Answer: A

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

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?
A . Introduce a new class accepting those five scalars and use it in the constructor and the remaining logic of Myservice
B. Modify the code of Myserviceso the number of different classes, interfaces, and scalar types used as parameters in the constructor and other methods is less than 13
C. Modify the code of Myserviceso that the number of different classes and interfaces referenced anywhere inside the class is less than 13

Answer: A

Explanation:

The best way to fix the code so that it complies with the coding standard rule is to introduce a new class accepting those five scalars and use it in the constructor and the remaining logic of Myservice. This will reduce the number of different classes, interfaces, and scalar types used as parameters in the constructor and other methods to less than 13, which is the limit set by the coding standard. Additionally, any extra code that is not necessary can be removed to reduce the general complexity of the class and improve readability.

Which two steps must be taken to fix this issue?

An Adobe Commerce Architect is asked by a merchant using B2B features to help with a configuration issue.

The Architect creates a test Company Account and wants to create Approval Rules for orders. The Approval Rules tab does not appear in the Company section in the Customer Account Menu when the Architect logs in using the Company Administrator account.

Which two steps must be taken to fix this issue? (Choose two.)
A . Set ‘Enable Purchase Orders’ in the B2B Admin to TRUE
B. Merchant needs to log out of frontend and then log back in to load new permissions
C. Set Enable Purchase Orders’ on the Company Record to TRUE
D. Make sure that the ‘Purchase Order’ payment method is active
E. Set ‘Enable B2B Quote" in the B2B Admin to TRUE

Answer: A,C

Explanation:

Enabling Purchase Orders at both the B2B Admin and the Company Record levels is necessary for Approval Rules to appear in the Company section of the Customer Account Menu. When ‘Enable Purchase Orders’ is set to TRUE, the system assumes that the company will be making purchases using purchase orders, and the Approval Rules tab becomes visible.

Which two steps should the Architect make to meet this requirement?

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.)
A . Write a plugin for MagentoFrameworkConfigData::get() and read the custom xml files
B. Append the custom xml file name in "MagentoConfigModelConfigStructureReader" in di.xml
C. Create a Data class that implements "MagentoFrameworkConfigData’
D. Inject a "reader" dependency for "MagentoFrameworkConfigData" in di.xml
E. Make a Reader class that implements "MagentoFrameworkConfigReaderFilesystem"

Answer: C,E

Explanation:

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:

✑ C. Create a Data class that implements “MagentoFrameworkConfigData”

✑ E. Make a Reader class that implements

“MagentoFrameworkConfigReaderFilesystem”

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.