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

Page: 1 / 14
Total 69 questions
Question 1

A merchant of an Adobe Commerce Cloud project wants to setup one of their websites using a subdomain. The merchant is considering the domain to be set as secondstore.example.com.

In addition to editing the magento-vars.php file, and apply a domain check and set $_SERVER["MAGE_RUN_CODE"] and $_SERVER["MAGE_RUN_TYPE"].

What file is required to perform this action?



Answer : C

The developer can set up a subdomain for one of their websites by configuring the subdomain route in the .magento/routes.yaml file. This file defines how incoming requests are routed to different applications or services on the Adobe Commerce Cloud platform. The developer needs to add a route for secondstore.example.com and map it to the same application as example.com.The developer also needs to specify the upstream variable for secondstore.example.com as MAGE_RUN_CODE and MAGE_RUN_TYPE. Verified Reference: [Magento 2.4 DevDocs]3


Question 2

An Adobe Commerce developer is working on a module to manage custom brand entities and wants to replicate the following SQL query using SearchCriteria:

A)

B)

C)



Answer : B

The following SearchCriteria query will replicate the SQL query:

$searchCriteria = new \Magento\Framework\Api\SearchCriteriaBuilder();

$searchCriteria->addFilter('name', 'Brand 1', 'eq');

$searchCriteria->addFilter('status', 1, 'eq');

$brandCollection = $this->brandRepository->getList($searchCriteria);


Question 3

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 4

During database migration in the Adobe Commerce Cloud integration environment, a developer experienced a disk space error causing the database import to fail.

How would the developer fix this issue?



Answer : A

The developer can fix this issue by increasing the disk space of the database service. The database service is one of the services that run on the Adobe Commerce Cloud platform and provide functionality for the application. The database service uses MySQL as the database engine and stores data for products, customers, orders, etc. The disk space of the database service determines how much data can be stored and processed by the database. If the disk space is insufficient, the database import can fail with a disk space error. The developer can increase the disk space of the database service by modifying the .magento/services.yaml file and redeploying the environment. Verified Reference: [Magento 2.4 DevDocs]


Question 5

An Adobe Commerce Cloud developer wants to be sure that, even after transferring database from Production to Staging, the payment configurations are still valid on the Staging environment.

What does the developer need to add to be sure that the configurations are always properly set?



Answer : C

The developer needs to add environment level environment variables to be sure that the payment configurations are always properly set on the Staging environment. Environment variables are configuration settings that affect the behavior of the Adobe Commerce Cloud application and services. Environment variables can be set at the project level or the environment level. Project level variables apply to all environments, while environment level variables override the project level variables for a specific environment. The developer can use environment level variables to customize the payment configurations for the Staging environment without affecting other environments. Verified Reference: [Magento 2.4 DevDocs]


Question 6

There is the task to create a custom product attribute that controls the display of a message below the product title on the cart page, in order to identify products that might be delivered late.

The new EAV attribute is_delayed has been created as a boolean and is working correctly in the admin panel and product page.

What would be the next implementation to allow the is_delayed EAV attribute to be used in the .phtml cart page such as $block->getProduct()->getIsDelayed()?

A)

Create a new file etc/catalog_attributes.xmi:

B)

Create a new file etc/extension attributes.xmi:

Create a new file etc/eav attributes.xmi:



Answer : A

To allow the is_delayed EAV attribute to be used in the .phtml cart page, the developer needs to create a new file called etc/catalog_attributes.xmi. This file will contain the definition of the is_delayed attribute.

The following code shows how to create the etc/catalog_attributes.xmi file:

XML

<?xml version='1.0'?>

<catalog_attributes>

<label>Is Delayed</label>

<note>This attribute indicates whether the product is delayed.</note>

<sort_order>10</sort_order>

<required>false</required>

</catalog_attributes>

Once the etc/catalog_attributes.xmi file has been created, the is_delayed attribute will be available in the .phtml cart page. The attribute can be accessed using the getIsDelayed() method of the Product class.

PHP

$product = $block->getProduct();

$isDelayed = $product->getIsDelayed();

The isDelayed variable will contain the value of the is_delayed attribute. If the value of the attribute is 1, then the product is delayed. If the value of the attribute is 0, then the product is not delayed.


Question 7

An integration named Marketing is created on the Adobe Commerce instance. The integration has access on Magento_Customer:: customer resources and the access token is xxxxxx.

How would the rest API be called to search the customers?



Answer : B

According to the Magento Stack Exchange answer, UI components are used to render various elements on Magento admin pages, such as grids, forms, buttons, etc. UI components are defined in XML files that are located in the view/adminhtml/ui_component directory of each module. To add a custom logic to render a column in a grid, the developer should create a custom class extending MagentoUiComponentListingColumnsColumn and add the custom logic within the prepareDataSource method. This method receives an array of data sources and modifies them according to the column logic. The developer should also add an attribute class to the column node within the module's customer_listing.xml file and specify their custom class name as its value. Verified Reference: https://magento.stackexchange.com/questions/317821/how-to-add-custom-logic-to-render-a-column-in-a-grid-in-magento-2


Page:    1 / 14   
Total 69 questions