ExamGecko
Home Home / Adobe / AD0-E716

Adobe AD0-E716 Practice Test - Questions Answers, Page 5

Question list
Search
Search

List of questions

Search

Related questions











An Adobe Commerce developer is asked to create a new payment method for their project. This project has administrators who use the backend to manage customer information and occasionally place orders. When testing the new payment method on the frontend everything worked as expected, however, the payment method is missing in the admin.

What is a possible reason for this?

A.
In the module di.xml, there were no default 3DS verification types configured as a VirtualType.
A.
In the module di.xml, there were no default 3DS verification types configured as a VirtualType.
Answers
B.
In the module config.xmi, the boolean value for can_capture was set to false.
B.
In the module config.xmi, the boolean value for can_capture was set to false.
Answers
C.
In the module config.xmi, the node can_use_internal was not set to true.
C.
In the module config.xmi, the node can_use_internal was not set to true.
Answers
Suggested answer: C

An Adobe Commerce developer is asked to implement a 15% surcharge for all users from a 'Wholesale' customer group. Keeping best practices in mind, what is a correct to accomplish this?

A.
Declare a new total collector class to calculate the modified total if the current user is in the group, register it in the module's etc/sales .xml file, modify the checkout_cart_index.xml and checkout_index_index.xml layouts to include a new child in the totals block.
A.
Declare a new total collector class to calculate the modified total if the current user is in the group, register it in the module's etc/sales .xml file, modify the checkout_cart_index.xml and checkout_index_index.xml layouts to include a new child in the totals block.
Answers
B.
Create a Cart Price Rule that applies only to the 'Wholesale' group. Specify no conditions for the rule, and in the Actions section, specify for the rule to apply a 'Percent of product price discount', with the 'Discount Amount' field set to -15.
B.
Create a Cart Price Rule that applies only to the 'Wholesale' group. Specify no conditions for the rule, and in the Actions section, specify for the rule to apply a 'Percent of product price discount', with the 'Discount Amount' field set to -15.
Answers
C.
Create an Observer to the cataiog_product_get_final_price event. Check if the current customer is in the 'Wholesale' group, and if so, retrieve the product from the $observer->getEventC) data and Call $product->setData('final_price', $product->getData( 'final_price') * 1.15).
C.
Create an Observer to the cataiog_product_get_final_price event. Check if the current customer is in the 'Wholesale' group, and if so, retrieve the product from the $observer->getEventC) data and Call $product->setData('final_price', $product->getData( 'final_price') * 1.15).
Answers
Suggested answer: C

Explanation:

The possible reason why the payment method is missing in the admin is that in the module config.xml, the node can_use_internal was not set to true. This node determines whether the payment method can be used in the admin area or not. If it is set to false or omitted, the payment method will not be available for admin orders. To enable the payment method for admin use only, the node can_use_internal should be set to true and the node can_use_checkout should be set to false. Verified

Reference: [Magento 2.4 DevDocs] [Magento Stack Exchange]

There is an integration developed using a cron service that runs twice a day, sending the Order ID to the integrated ERP system if there are orders that are able to create an invoice. The order is already loaded with the following code:

$order = $this->orderRepository->get($orderId);

In order to verify if the store has invoices to be created, what implementation would the Adobe Commerce developer use?

A)

B)

C)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
Suggested answer: B

Explanation:

The developer can use the canInvoice method of the order object to check if the order can be invoiced or not. This method returns true if the order has a state of new, processing, or payment review and has not been fully invoiced yet. The developer can use this method in a conditional statement to send the order ID to the ERP system only if the order can be invoiced. Verified

Reference: [Magento 2.4 DevDocs] [Magento Stack Exchange]

An Adobe Commerce developer has created a new shipping carrier Everything has been implemented and the collectRates() and getAllowedMethodsQ functions can be seen below:

Given the above code, what would be the displayed cost of the shipping method and final amount charged to the customer?

A.
The shipping method would display SO but customers would pay a $10 handling fee for their order.
A.
The shipping method would display SO but customers would pay a $10 handling fee for their order.
Answers
B.
The shipping method would display $0 and customers would pay $0 for using the new shipping method.
B.
The shipping method would display $0 and customers would pay $0 for using the new shipping method.
Answers
C.
The shipping method would display $10 and customers would pay $10 for using the new shipping method.
C.
The shipping method would display $10 and customers would pay $10 for using the new shipping method.
Answers
Suggested answer: C

Explanation:

The shipping method would display $10 and customers would pay $10 for using the new shipping method. This is because the collectRates method sets the price and cost of the shipping method to 10 in the result object. The price is what is shown to the customer on the frontend and the cost is what is charged to the customer when they place the order. The handling fee is not used in this case because it is set to zero in the config.xml file. Verified

Reference: [Magento 2.4 DevDocs] [Magento Stack Exchange]

An Adobe Commerce developer is creating a new module to extend the functionality of the cart. The module is installed in app/code/CompanyName/ModuleName/.

How would an Adobe Commerce developer extend the existing CartltemPrices GraphQL schema to include a custom base_price field?

A.
Create and Configure a for Hagento\QuoteGraphQl\Model\Resolver\CartItemPrices that adds the base_price field in the resolve() function.
A.
Create and Configure a for Hagento\QuoteGraphQl\Model\Resolver\CartItemPrices that adds the base_price field in the resolve() function.
Answers
B.
Add the following to the module's etc/schema.graphqis file:
B.
Add the following to the module's etc/schema.graphqis file:
Answers
C.
Add the following to the module's etc/graphqi/di.xmi file:
C.
Add the following to the module's etc/graphqi/di.xmi file:
Answers
Suggested answer: B

Explanation:

The developer can extend the existing CartltemPrices GraphQL schema to include a custom base_price field by adding the following code to the module's etc/schema.graphqls file:

extend type CartltemPrices { base_price: Money! @doc(description: ''The base price of the cart item'') }

This code adds a new field called base_price to the CartltemPrices type and specifies that it is of type Money and it is not nullable. The @doc directive adds a description for the field that will be shown in the schema documentation. The developer also needs to create a custom resolver class for the base_price field and declare it in the di.xml file of the module. Verified

Reference: [Magento 2.4 DevDocs] [Magento Stack Exchange]

An Adobe Commerce developer added a new API method to search and retrieve a list of Posts for a custom Blog functionality. This is the content of the module's etc/webapi.xml file:

The new code has been deployed to production and the merchant is using https: //merchant. domain. com/swagger to review the new endpoint, but it is not visible in swagger.

What would be a reason for this?

A.
The webapi.xml file should be moved into the etc/webapi_rest/webapi.xml file.
A.
The webapi.xml file should be moved into the etc/webapi_rest/webapi.xml file.
Answers
B.
Since the new endpoint is not anonymous, the merchant needs to enter a valid integration token in swagger in order to see the new method.
B.
Since the new endpoint is not anonymous, the merchant needs to enter a valid integration token in swagger in order to see the new method.
Answers
C.
The greturn annotation is missing in the MyVendor\Blog\Api\PostRepositoryInterf ace class.
C.
The greturn annotation is missing in the MyVendor\Blog\Api\PostRepositoryInterf ace class.
Answers
Suggested answer: B

Explanation:

The reason why the new endpoint is not visible in swagger is that since the new endpoint is not anonymous, the merchant needs to enter a valid integration token in swagger in order to see the new method. The webapi.xml file specifies that the resource for the new endpoint is MyVendor_Blog::post, which means that only authorized users with this permission can access it. To generate an integration token, the merchant needs to create an integration in the admin panel and activate it. Then they can copy the token and paste it in swagger's authorization field. Verified

Reference: [Magento 2.4 DevDocs] [Magento Stack Exchange]

A message queue currently has queue/consumer-wait-for-messages set to true, which allows the consumer process to run until a message is inserted into the queue. A piece of functionality is driven by data stored in the model

\Magento\variable\Model\variable and this value is only loaded once during the consumer run. If the variable is updated we want the consumer to restart so that the new value is loaded into memory without having to reload the variable on each message consumed.

The Adobe Commerce developer has created an after plugin on the \Magento\Variable\Model\variable:: save() function.

How would the developer use the plugin to trigger the consumer restart?

A.
Call the function \Magento\Framework\MessageQueue\PoisonPill\Poi5onPillPutInterface::put().
A.
Call the function \Magento\Framework\MessageQueue\PoisonPill\Poi5onPillPutInterface::put().
Answers
B.
Call the function \Magento\Framework\MessageQueue\Consumers\TriggerRe5tartInterface:trigger().
B.
Call the function \Magento\Framework\MessageQueue\Consumers\TriggerRe5tartInterface:trigger().
Answers
C.
Set the global Cache key trigger_consumer_restart t0 1.
C.
Set the global Cache key trigger_consumer_restart t0 1.
Answers
Suggested answer: B

Explanation:

The developer can use the plugin to trigger the consumer restart by calling the function \Magento\Framework\MessageQueue\Consumers\TriggerRe5tartInterface:trigger(). This function will write a flag to the cache storage that will be checked by the consumer process.If the flag is set, the consumer process will terminate itself and restart with the updated configuration. Verified

Reference: [Magento 2.4 DevDocs]1

How would a developer enable the magnification of CSS files on an Adobe Commerce Cloud Staging environment?

A.
Locally from the command line bin/magento config:set --lock-config dev/css/minify_files 1 Commit the app/etc/config.php file and redeploy.
A.
Locally from the command line bin/magento config:set --lock-config dev/css/minify_files 1 Commit the app/etc/config.php file and redeploy.
Answers
B.
Update the stores > setting > configuration > Advanced > Developer > css configuration in the Admin Panel.
B.
Update the stores > setting > configuration > Advanced > Developer > css configuration in the Admin Panel.
Answers
C.
SSH to the Adobe Commerce Staging environment. From the command line
C.
SSH to the Adobe Commerce Staging environment. From the command line
Answers
Suggested answer: A

Explanation:

The developer can enable the magnification of CSS files on an Adobe Commerce Cloud Staging environment by locally running the command bin/magento config:set --lock-config dev/css/minify_files 1 from the command line. This will set the configuration value in the app/etc/config.php file and lock it from being changed in the Admin Panel.The developer then needs to commit the app/etc/config.php file and redeploy the environment. Verified

Reference: [Magento 2.4 DevDocs]2

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?

A.
Configure secondstore.example.com subdomain route in NGINX virtual-host configuration file.
A.
Configure secondstore.example.com subdomain route in NGINX virtual-host configuration file.
Answers
B.
Configure secondstore.example.com subdomain route in .magento/services.yaml.
B.
Configure secondstore.example.com subdomain route in .magento/services.yaml.
Answers
C.
Configure secondstore.example.com subdomain route in .magento/routes.yaml.
C.
Configure secondstore.example.com subdomain route in .magento/routes.yaml.
Answers
Suggested answer: C

Explanation:

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

What is the command used to upgrade ECE-Tools on an Adobe Commerce Cloud platform?

A.
php ./vendor/bin/ece-tools upgrade
A.
php ./vendor/bin/ece-tools upgrade
Answers
B.
composer update magento/ece-tools --with-all-dependencies
B.
composer update magento/ece-tools --with-all-dependencies
Answers
C.
magento-cloud ece-tools:upgrade
C.
magento-cloud ece-tools:upgrade
Answers
Suggested answer: B

Explanation:

The command used to upgrade ECE-Tools on an Adobe Commerce Cloud platform is composer update magento/ece-tools --with-all-dependencies. This command will update the ECE-Tools package and its dependencies to the latest version available in the composer repository. The developer then needs to commit and push the changes to the composer.json and composer.lock files and redeploy the environment. Verified

Reference: [Magento 2.4 DevDocs]

Total 69 questions
Go to page: of 7