Exam4Training

Adobe AD0-E718 Adobe Commerce Architect Master Online Training

Question #1

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

Reveal Solution Hide Solution

Correct Answer: B
Question #2

A merchant notices that product price changes do not update on the storefront.

The index management page in the Adobe Commerce Admin Panel shows the following:

• All indexes are set to ‘update by schedule’

• Their status is ‘ready’

• There are no items in the backlog

• The indexes were last updated 1 minute ago

A developer verifies that updating and saving product prices adds the relevant product IDs into the catalog_product_price_cl changelog table.

Which two steps should the Architect recommend to the developer to resolve this issue? (Choose two.)

  • A . Invalidate the catalog_product_price indexer in the Adobe Commerce Admin Panel so
    that it is fully reindexed next time the cron runs.
  • B . Manually reindex the catalog_product_price index from the Command line:binmagentor indexer:reindex catalog_product_price.
  • C . Make sure that no custom or third-party modules modify the changelog and indexing process.
  • D . Make sure that the version_id for the price indexer in the mview_state table is not higher than the last entry for the same column in the changelog table and re-synchronize.
  • E . Reduce the frequency of the cron job to 5 minutes so the items have more time to process.

Reveal Solution Hide Solution

Correct Answer: B C
Question #3

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

Reveal Solution Hide Solution

Correct Answer: A
Question #4

An Adobe Commerce Architect is working on a scanner that will pull prices from multiple external product feeds. The Architect has a list of vendors and decides to create new config file marketplacejeeds.xml.

Which three steps can the Architect take to ensure validation of the configuration files with unique validation rules for the individual and merged files? (Choose three.)

  • A . Implement validation rules in the Converter class for the Config Reader
  • B . Add the Uniform Resource Name to the XSD file in the config XML file.
  • C . Provide schema to validate a merged file.
  • D . Provide schema to validate an individual file.
  • E . Create a class that implements MagentoFrameworkConfigDatalnterface.
  • F . Create validation rules in marketplace.schema.xsd.

Reveal Solution Hide Solution

Correct Answer: C D F
C D F

Explanation:

The three steps that the Architect can take to ensure validation of the configuration files with unique validation rules for the individual and merged files are:

D. Provide schema to validate an individual file,

F. Create validation rules in marketplace.schema.xsd, and

E. Create a class that implements MagentoFrameworkConfigDataInterface. By providing schema to validate individual files, creating validation rules in marketplace.schema.xsd, and creating a class that implements MagentoFrameworkConfigDataInterface, the Architect can ensure that the configuration files are validated with unique validation rules for the individual and merged files.

Question #5

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

Reveal Solution Hide Solution

Correct Answer: A,C
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.

Question #6

An Architect is working to implement Adobe Commerce into a pre-built ecosystem in a company.

Communication between different company domains uses event-driven design and is driven via AMQP protocol with usingRabbitMQ.

The Architect needs to establish the data flow between the ERP system and Adobe Commerce.

The ERP system stores only customer data excluding customer addresses.

The role of Adobe Commerce is to provide Customer Address data to the enterprise ecosystem.

Primary Customer data should not be changed from Adobe Commerce side; it should only be updated by messages data from ERP.

Which three AMQP configurations should be considered to meet these requirements? (Choose three.)

  • A . Create a queue_consumer.xml and communction.xml configuration files for Customer data messages
  • B . Create a queue_publisher.xml configuration file for Customer data messages
  • C . Create a nueue_publisher.xml configuration file for Customer Address messages
  • D . Create a queue_topology.xml configuration file for Customer Address messages
  • E . Create a queue_topology.xmlconfiguration file for Customerdata messages
  • F . Create a queue_customer.xml and communication.xml configuration files for Customer Address messages

Reveal Solution Hide Solution

Correct Answer: ACD
Question #7

An Adobe Commerce Architect gets a request to change existing payment gateway functionality by allowing voided transactions only for a certain range of paid amounts.

In the vendor module file etc/config.xml,payment method has an option can,_voidsetto 1.

How should this customization be done?

  • A . Extend MagentoPaymentModel\MethodAdapter and reimplement method void. Use this new class as a new type of payment method facade configuration overriding virtualType type for adapter.
  • B . Declare a new plugin for class MagentoPayment GatewayConfigConfigValueHandler and using the afterHandle method, change the result for Subject can_void.
  • C . Add new handler with name can_void to virtualType based on typeMagento paymentGatewayconfigValueHandlerPool In payment method facade configuration.

Reveal Solution Hide Solution

Correct Answer: B
Question #8

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

Reveal Solution Hide Solution

Correct Answer: A
Question #9

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.

Reveal Solution Hide Solution

Correct Answer: D,E
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.

Question #10

An Adobe Commerce Architect needs to customize the workflow of a monthly installments payment extension. The extension is from a partner that is contracted with the default website PSR which has its own legacy extension (a module using deprecated payment method).

The installment payment partner manages only initializing a payment, and then hands the capture to be executed by the PSP. Once the amount is successfully captured, the PSP notifies the website through an IPN. The goal of the IPN is only to create an "invoice" and save the ‘capture information’ to be used later for refund requests through the PSP itself.

The Architect needs the most simple solution to capture the requested behavior without side effects.

Which solution should the Architect implement?

  • A . Add a plugin before the $invoice-> () and changes its input to prevent the call of the $payment-> capture()
  • B . Change the can_ capture attribute for the payment method under config.xml to be <can_capture>0</can_capture>
  • C . Declare a capture command with type
    MagentopaymentGatewayCommandNullCommand for the payment method CommandPool in di.zm1

Reveal Solution Hide Solution

Correct Answer: C
C

Explanation:

The best solution for the Adobe Commerce Architect to implement in order to capture the requested behavior without side effects is to declare a capture command with type MagentopaymentGatewayCommandNullCommand for the payment method CommandPool in di.xml. This will allow the partner to initialize the payment and then hand the capture over to the PSP, while also preventing the website from calling the $payment->capture() method. It will also allow the PSP to notify the website through an IPN, which will create an "invoice" and save the ‘capture information’ to be used later for refund requests through the PSP itself.

Question #11

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"

Reveal Solution Hide Solution

Correct Answer: C,E
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.

Question #12

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

Reveal Solution Hide Solution

Correct Answer: C
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

Question #13

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.

Reveal Solution Hide Solution

Correct Answer: C
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.

Question #14

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

Reveal Solution Hide Solution

Correct Answer: C
Question #15

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

Reveal Solution Hide Solution

Correct Answer: A
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.

Exit mobile version