Adobe Commerce Developer with Cloud Add-on AD0-E716 Exam Questions

Page: 1 / 14
Total 69 questions
Question 1

An Adobe Commerce developer is asked to change the tracking level on a custom module for free downloading of pdf and images.

The module contains following models:

Download class has a parameter for tracking_level.

How will the developer configure the tracking_level parameter, in di.xml.to have a value of 4 for Download class and all classes that extend Download?

A)

B)

C)



Answer : B

To configure the tracking_level parameter in di.xml to have a value of 4 for the Download class and all classes that extend Download, the developer would use the following code:

<config>

<global>

<models>

<Vendor\FreeDownload\Model\Download>

<setting name='tracking_level' value='4'/>

</Vendor\FreeDownload\Model\Download>

<Vendor\FreeDownload\Model\DownloadPdf>

<rewrite name='tracking_level' value='4'/>

</Vendor\FreeDownload\Model\DownloadPdf>

<Vendor\FreeDownload\Model\DownloadImage>

<rewrite name='tracking_level' value='4'/>

</Vendor\FreeDownload\Model\DownloadImage>

</models>

</global>

</config>

The setting element is used to set a configuration value for a specific model. The rewrite element is used to override the default configuration value for a specific model. In this case, the tracking_level parameter is set to 4 for all models that extend Download.


Question 2

A new customer registered on the Integration environment of an Adobe Commerce Cloud project but did not receive a welcome email What would be blocking the email from being sent?



Answer : C

The reason why the new customer did not receive a welcome email is that the Outgoing Emails setting is disabled in the Environment Settings in the Project Web Interface. This setting controls whether emails are sent from the application or not. By default, this setting is disabled for integration environments to prevent spamming or testing emails from being sent to real customers or recipients. The developer can enable this setting if they want to test email functionality on integration environments. Verified Reference: [Magento 2.4 DevDocs]


Question 3

An Adobe Commerce Developer is tasked with creating a custom form which submits its data to a frontend controller They have decided to create an action and have implemented the \Magento\Framework\App\Action\HttpPostActioninterface class, but are not seeing the data being persisted in the database, and an error message is being shown on the frontend after submission.

After debugging and ensuring that the data persistence logic is correct, what may be cause and solution to this?



Answer : C

According to the Magento Stack Exchange answer, form key validation is a security feature that prevents CSRF attacks by checking if the form key in the request matches the one generated by Magento. If the developer does not include the form_key in their custom form, the validation will fail and an error will be shown. Therefore, the developer needs to add the form_key to their requests by using <?= $block->getBlockHtml ('formkey') ?> in their template file. Verified Reference: https://magento.stackexchange.com/questions/95171/magento-2-form-validation


Question 4

An Adobe Commerce developer has created a process that exports a given order to some external accounting system. Launching this process using the Magento CLI with the command php bin/magento my_module:order: process --order_id= is required.

Example: php bin/magento my_module:order:process --order_id=1245.

What is the correct way to configure the command?

A)

B)

C)

D)



Answer : C

According to the How to use the Magento command-line interface (CLI) guide, to configure and run the Magento CLI, the developer needs to make the bin/magento file executable and then use it to run commands. To create a custom command, the developer needs to create a class that implements \Symfony\Component\Console\Command\Command and define its name, description, arguments, options, and logic. The developer also needs to register the command in the di.xml file of their module using the Magento\Framework\Console\CommandList argument. Therefore, option C is the correct answer, as it shows the correct class and di.xml code to configure the custom command. Verified Reference: https://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/magento1/using-the-magento-command-line-interface-cli/


Question 5

An Adobe Commerce developer has created a module that adds a product attribute to all product types via a Data Patch-According to best practices, how would the developer ensure this product attribute is removed in the event that the module is uninstalled at a later date?



Answer : C

According to the Develop data and schema patches guide for Magento 2 developers, data patches can also implement PatchRevertabieinterface to provide rollback functionality for their changes. The revert() method contains the instructions to undo the data modifications made by the patch. To ensure that the product attribute is removed when the module is uninstalled, the developer should make the data patch implement PatchRevertabieinterface and implement the revert method to remove the product attribute using EavSetupFactory or AttributeRepositoryInterface. Verified Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/data-patches.html


Question 6

On an Adobe Commerce Cloud platform, at what level is the variable env: composer_auth located in the Project Web Interface?



Answer : C

The variable env: composer_auth is located in the Project variables section in the Project Web Interface. This variable is used to store the authentication credentials for Composer repositories that require access keys or tokens.The developer can set this variable at the project level to apply it to all environments, or override it at the environment level if needed. Verified Reference: [Magento 2.4 DevDocs]2


Question 7

An Adobe Commerce developer has been asked to modify the PageBuilder slider content type to allow a new custom content type (other than slide) to be assigned as a child. The developer has already created the new content type called improved_slide in their module. They now need to create a new view/adminhtml/pagebuilder/content_type/slider. xml file in their module to allow the new content type to be a child of slider content types.

What is the correct xml to accomplish this?

A)

B)

C)



Answer : B

The following XML will allow the new content type to be a child of slider content types:

<type>slider</type>

<children>

<type>improved_slide</type>

</children>

Use code with caution.https://bard.google.com/faq

This XML will tell Magento that the slider content type can have improved_slide content types as children.


Page:    1 / 14   
Total 69 questions