Professional Documents
Culture Documents
AD0-E703
Adobe Certified Expert - Magento Commerce
Developer
https://www.certsguru.com/
Question #:1
You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on
the product page, its values must be different depending on the selected language.
A. Use the Magento CLI to create a new custom attribute, then generate dictionaries for all supported
languages
Answer: D
Question #:2
C. It is made available in the Magento API for the purpose of data manipulation
Answer: A D
Explanation
https://devdocs.magento.com/guides/v2.4/architecture/archi_perspectives/persist_layer.html
Question #:3
B. A proxy configured to intercept all calls to any public method and log them
C.
https://www.certsguru.com/
C. An extension attribute configured in the extension_attributes.xml
Answer: D
Question #:4
You are building an tool that imports products from an ERP. There are 20 columns of additional information
that are associated with each product. This extra information must also be associated with an update time to
know when to refresh the data. Keeping maintainability in mind, how do you build this into Magento?
C. Create a separate model and build code to associate the two record types.
Answer: A
Question #:5
Your module adds a new controller class which will return a JSON response.
A. You should implement a new API endpoint instead of returning JSON from a controller
C. An instance of \Magento\Framework\Controller\Result\Json
D. No return needed, an object that can be converted to JSON must be set as the Response body
Answer: C
Question #:6
You are tasked with ensuring customers who log into the site are authorized. By default, this consists of
ensuring the customers email and password match the values in the database. On this project, you need to
verify additional data in this process.
A.
https://www.certsguru.com/
A. Create a before plugin for \Magento\Customer\Api\AccountManagementInterface’s authenticate method
D. Override \Magento\Customer\Controller\AccountController.php
Answer: A
Question #:7
You have created a new product type, sample, and need to customize how it renders on the shopping cart page.
Keeping maintainability in mind, how do you add a new renderer?
B. Override the cart/form.phtml template and add logic for the sample product type.
C. Create the layout file, checkout_cart_index.xml, and reference the checkout.cart.renderers block and add
a block with the as="sample" attribute.
D. Create the layout file, checkout_cart_index.xml, and update the cart page's uiComponent to
appropriately render the sample product type.
Answer: A
Question #:8
In layout files you can change al element’s order on a page. This can be done using one of the following:
<move> instruction
A. They are the same, both provide access to the same functionality
D. Before and after attributes can only be used with referenceContainer and referenceBlock
Answer: C
https://www.certsguru.com/
Question #:9
How do you select a list of records from the database where the record ids are in the $ids list?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Question #:10
While integrating a merchant’s product information management system with Magento, you create a module
MyCompany_MerchantPim that adds a catalog product EAV attribute pim_entity_id programmatically. In
which type of setup script do you create the EAV attribute?
A. Setup/InstallSchema.php
B. Setup/UpgradeSchema.php
C. Setup/InstallEntity.php
D. Setup/UpgradeData.php
https://www.certsguru.com/
Answer: D
Question #:11
You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer
specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
Answer: A
Question #:12
You need to render a product attribute’s raw value as a variable in a script tag. This value will be used to
initialize an application on the frontend. How do you render this value?
Answer: A
Question #:13
You want to remove a column introduced by a third-party extension via declarative schema.
B. Modify the original etc/db_schema.xml file and remove the column from there
D.
https://www.certsguru.com/
D. Copy the etc/db_schema.xml file into your module and remove the column from your copy
Answer: D
Question #:14
A. Categories have no connection to product attribute sets, and any product can be assigned to any category
B. Each category is linked to a single product attribute set, and only products from that attribute set are
allowed in the category
C. Each category is linked to a single product attribute set, and only products from that category’s set or
any of its parent categories’
D. Categories can be connected to multiple product attribute sets, and only products from one of those sets
are allowed in the category
Answer: A
Question #:15
A merchant tasks you to keep sales managers out of the system configuration backend pages.
A. You remove access to the restricted pages from each user’s ACL settings
B. You create a role with limited permissions and assign all sales manager users to the new role
D. You create a role with access to the system configuration pages and assign it to all users except the sales
managers
Answer: B
Question #:16
You are building a report using complex SQL aggregations to locate the required data.
A. Resource model
https://www.certsguru.com/
B. Repository
C. Model
D. Helper
Answer: A
Question #:17
A merchant is interested in setting different prices for the same products in different store scopes.
C. The price scope can be set to store but this will lead to performance degradation of category pages
Answer: A
Question #:18
A. You can only access the select query after the collection has been loaded by calling the public method
query()
B. It is stored in a protected variable $query and can only be accessed from the inside of a collection class
C. You can get it by using public method getSelect() which returns an instance of
Magento\Framework\DB\Select
D. The select query is not available in the collection class, it will be generated by the MySQL adapter right
before executing a query
Answer: C
Question #:19
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named
https://www.certsguru.com/
product.info using layout XML?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Question #:20
B. Clearing cache
Answer: B D
https://www.certsguru.com/
Question #:21
Magento and third-party developers can find it difficult to track and report the dependencies that customized
extensions have on other extensions. To address these issues, the Magento system introduces service contracts.
What is a Service Contracts - Data interfaces?
A. set of PHP interfaces that are defined for a module includes data interfaces
B. set of API interfaces that are defined for a module includes web APIs
Answer: A
Question #:22
In a code review of a merchant’s site you have discovered that there are multiple observers for the
checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the
others being executed before it is called.
A. There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be
changed.
B. Event observers are fired in alphabetical order of the observer name. There is no risk here.
C. Magento only supports one observer per event. These observers will need to be combined into a single
point of customization.
D. Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should
be re-worked using plugins
Answer: D
Question #:23
You have created a custom module which must perform an action immediately after an order is placed, but
only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target
event which the module will observe.
A. etc/frontend.xml
B.
https://www.certsguru.com/
B. etc/events.xml
C. etc/config.xml
D. etc/frontend/events.xml
Answer: D
Question #:24
You got a notification about error that occurred on a production environment. The merchant gave you the error
identifier.
B. The error is sent to the pre-configured error email with the identifier in the subject
C. A file with a name matching the identifier is written to the var/report folder
D. An error message is written to the database table error_log with an error_id field matching the identifier
Answer: B
Question #:25
You are building a new module to add extra functionality to the Magento application. What files are required?
A. registration.php
B. etc/module.xml
C. composer.json
D. Setup/InstallSchema.php
E. etc/config.xml
Answer: A B C
Question #:26
How can you force Magento to execute an existing Data Patch file again?
https://www.certsguru.com/
A. By removing the Data Patch, running the command: bin/magento setup:db-data:upgrade, then copying
the file back and running the command again
B. By deleting the record with the Data Patch class name from the table patch_list table
Answer: B
Question #:27
You need to find all orders in the processing state. You have written the code:
When you run the code, you get the following exception:
Answer: C
Question #:28
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
C. Using a URL Rewrite stored in the database connecting the request path with the target path
https://www.certsguru.com/
D. A plugin on \Magento\UrlRewrite\Controller\Router::match loads products by the url_key attribute
Answer: C
Question #:29
You are making some major adjustments to a core Magento class (ClassA). These adjustments are only
necessary when utilized from a specific Magento class (ClassB). You have created MyClass that contains the
needed customizations.
Keeping upgradeability in mind, how do you configure di.xml to make the substitution happen?
A. Ensure that MyClass extends ModuleA and set the <argument/>, for ModuleB to point to your new class
in di.xml.
D. Create a virtual type that extends ModuleB, specifying an <argument/> for MyClass.
Answer: A
Question #:30
You are debugging a problem resulting from a recently deployed around plugin. The plugin is intercepting the
doSomething method. The aroundDoSomething plugin method is called successfully, but the original
doSomething method is no longer being executed as expected.
A. The sort order of the plugin is too high and supersedes the priority of the intercepted method
B. The plugin implementation returned something other than its callable argument
Answer: C
Question #:31
A.
https://www.certsguru.com/
A. Global only
B. Website only
Answer: A
Question #:32
Answer: D
Question #:33
Which method of a Magento resource model will remove a record from the database?
A. remove
B. erase
C. clean
D. delete
Answer: D
Question #:34
You have created a new block and will be adding this block on every page. The block contains user-specific
information and cannot be cached. The block is added to the default.xml with:
https://www.certsguru.com/
What does this accomplish?
B. FPC will cache the block content for all cacheable pages
C. FPC will be bypassed for this block and all other page content will be cached
Answer: D
Explanation
https://magento.stackexchange.com/questions/103256/how-to-disable-the-cache-for-the-block-in-magento-2
Question #:35
B. The customer will see all products from all children of the category
Answer: B
Question #:36
You are building CLI that use the console to create a customer account with our custom command as like
https://www.certsguru.com/
B. new InputOption(Customer::KEY_STORE, null, InputOption::VALUE_REQUIRED, '(Required) Store
ID'),
Answer: A B
Question #:37
Magento 2’s architecture uses code to bootstrap a custom module that resides in app/code.
What two files are required to make a module usable? (Choose two.)
A. Helper/Data.php
B. etc/config.xml
C. etc/module.xml
D. registration.php
Answer: C D
Question #:38
A third-party module uses a layout update that changes the template path for a core block from
product/view/addto/compare.phtml of the Magento_Catalog module to custom/view/addto/compare.phtml of
your custom module. The merchant has a customized version of this template in their custom theme.
A. If the custom module is removed, the custom template will no longer apply
https://www.certsguru.com/
C. If a preference for the core block is set, the template will no longer apply
D. If another module is installed which also customizes the same core template, the templates will be
rendered sequentially
Answer: A
Question #:39
You are working on a Magento store which will be selling in two countries. Each country has its own set of
payment methods.
Answer: A
Question #:40
The extension is developed by the company called MyCompany and its codebase is available from all four
locations listed below.
Which two installations options do you choose from to prevent version conflicts during upgrade? (Choose
two.)
A. Clone the code from GitHub and put it into the vendor directory
B. Download the extension code from the developer’s website, and put it into app/code
C. Use Magento web setup wizard to pull the code from Magento’s composer repository
Answer: B D
Question #:41
https://www.certsguru.com/
You have configured an event observer to watch the checkout_submit_all_after event using this XML:
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Question #:42
How can you render a text on a page using only layout xml?
https://www.certsguru.com/
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Question #:43
When you reload the page you get a PHP error that the wrong argument is passed to the class.
B.
https://www.certsguru.com/
B. Deploy static content
Answer: C
Explanation
https://magento.stackexchange.com/questions/78826/creating-custom-module-in-magento2-show-fatal-error
Question #:44
A. https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
B. https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js
C. https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
D. https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
Answer: A
Question #:45
As you are scanning folder in the vendor/module-catalog directory, you see a directory that is named Ui. What
is this folder's purpose?
C. It contains the block PHP files that render HTML onto the frontend.
D. It is not a normal folder and further investigation is necessary to determine the purpose.
Answer: A
Question #:46
https://www.certsguru.com/
You have been asked to display details from the customer’s latest order on the customer’s account dashboard
(customer/account/). You create a new custom template to show the information.
A. Create a view model and specify an OrderRepositoryInterface argument in the _construct method
Answer: A
Question #:47
A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or
more billing addresses.
A. By adding the attribute like customer_address_billing2 and customizing both My Account and Checkout
functionality to use that new attribute
B. By changing the System Configuration setting: Customer>Allow multiple billing addresses to Yes
C. By altering the customer_entity table, adding the field billing_address2, and customizing both My
Account and Checkout functionality to use that new field
Answer: D
Question #:48
You need to add a new column to the sales_shipment and the sales_shipment_grid tables. Other than utilizing
the default addColumn methods, what way is automatic?
D.
https://www.certsguru.com/
D. Ensure your UpgradeSchema class extends CoreSetup and call $this->addSalesColumns().
Answer: A
Question #:49
Magento allows you to specify custom values per store for product attributes created in the admin panel.
A. Store Manager
B. Extension Attribute
D. Dependency Injection
Answer: C
Question #:50
A client has asked you to include category url keys in product URLs.
Answer: C
Question #:51
You are reviewing a module to some special functionality to the Magento 2 application, You see directory
/CustomerData, What task you think in this directory contain script for this modules?
A. Contains section files that works with the data stored on the client side.
D.
https://www.certsguru.com/
D. Contains view files, including static view files, design templates, email templates, and layout files.
Answer: A
Question #:52
You have created a module to show manufacturer-list,Your customer need url as www.storeurl/manufacturer
which file are mendatory to show correct url?
A. Controller: /Manufacturer/Controller/Index/Index.php
B. Block: /Manufacturer/Block/Index.php
C. Layout: Manufacturer/view/frontend/layout/manufacturer_index_index.xml
D. Templates:/Manufacturer/view/templates/content.phtml
E. Layout: Manufacturer/view/frontend/layout/index_index.xml
F. Layout: Manufacturer/view/frontend/layout/manufacturer.xml
Answer: A B C
Question #:53
A module MyModule needs to send notifications to customers only when the account was modified from a
mobile app using the REST web APIs.
A. etc/webapi_rest/events.xml
B. etc/adminhtml/events.xml
C. etc/webapi/rest_events.xml
D. etc/events.xml
Answer: A
Question #:54
You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on
a frontend page. The displayed information varies based on the country of a given store.
https://www.certsguru.com/
What two elements automatically render their children? (Choose two.)
C. <container name=”shop.info.details”/>
Answer: C D
Question #:55
A. mymodule_feature
B. custom_feature
C. mymodule_feature_index
D. custom_feature_index
Answer: C
Question #:56
Answer: A
Question #:57
https://www.certsguru.com/
You are building a new module to add extra functionality to the Magento application.You want to works with
CustomerData the data stored on the client side. Where initialized sections Cart and Directory-data are on the
server side via the classes?
Answer: A
Question #:58
You are reviewing a Magento module and see a directory named Service.
D. You need to review the files in this folder to understand its purpose
Answer: D
Question #:59
You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml.
D. It informs Magento that the theme is present and available for use
Answer: B
https://www.certsguru.com/
Question #:60
You are working on a new entity called vendor. You implemented the model, resource model and collection.
You want to ensure that standard model events will be fired for your model, so an observer can be created for
the events vendor_save_after, vendor_save_commit_after and others.
A. Create an entry in etc/di.xml and add the argument eventPrefix with the value of vendor
B. Declare the $_eventPrefix property in your vendor model and set it to vendor
C. You must implement all appropriate methods and fire the events manually
D. Ensure that the primary key in the corresponding table is named vendor_id
Answer: B
Question #:61
How do you identify which REST endpoints are supported by the module?
B. Every public method of every interface in the Api folder automatically is exposed as a REST endpoint
Answer: D
Explanation
https://devdocs.magento.com/guides/v2.4/get-started/gs-web-api-request.html
Question #:62
What will be the result of calling the save() method on a collection instance?
A. It will save all items with one INSERT … ON DUPLICATE KEY UPDATE query
B. It will loop over all items and call save () on each one
C. It will save the select query execution result into the cache
D.
https://www.certsguru.com/
D. It will save the select query to the cache
Answer: B
Question #:63
A merchant tasked you to add an input field for notes to the Customer Account Information backend page.
Which three actions do you specify in a module’s Data Patch to add a customer notes attribute? (Choose
three.)
A. $cache->clean([‘eav’, ‘db_ddl’]);
D. $notesAttribute->setData(‘used_in_forms’, [‘adminhtml_customer’]);
Answer: A B D
Question #:64
A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file
upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be
added.
How do you specify the class that will process the uploaded file?
A. <upload_model>\Magento\Config\Model\Config\Upload\File</upload_model>
B. <frontend_model>\Magento\Config\Model\Config\Frontend\File</frontend_model>
C. <backend_model>\Magento\Config\Model\Config\Backend\File</backend_model>
D. <source_model>\Magento\Config\Model\Config\Source\File</source_model>
Answer: C
Question #:65
You have created a module controller that responds to the following URL: /mycompany/product/load/id/123.
https://www.certsguru.com/
Which two methods will load the product model by ID as specified in the URL? (Choose two.)
A. \Magento\Catalog\Model\ResourceModel\Product::load($productModel, $id)
B. \Magento\Catalog\Model\ResourceModel\Product\Collection::load()->fetchById($id)
C. \Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)
D. \Magento\Catalog\Api\ProductRepositoryInterface::getById($id)
Answer: B D
Question #:66
You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the
loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12,
$15.
B. 10
D. 15
Answer: B
Question #:67
You are creating a module that will be sold on the Magento Marketplace. You wish for this module to be
easily extensible, and decide to add the capability for other developers to utilize extension attributes. What is
the minimum update necessary to enable this capability?
Answer: A
https://www.certsguru.com/
Question #:68
You are updating a module to add extra functionality to the Magento application, Where would Magento look
for modules?
A. app/code/VendorName/ModuleName
B. vendor/vendor-name/module-name
C. app/vendor/vendor-name/module-name
D. lib/vendor-name/module-name
Answer: A B
Question #:69
\Magento\Catalog\Api\ProductRepositoryInterface::save().
To resolve the issue, you decide to find all logic which customizes this method. Which two places do you
search for customization declarations? (Choose 2)
A. */di.xml
B. */config.xml
C. */events.xml
D. */plugins.xml
Answer: A C
Question #:70
C. The plugin will be ignored because ActionInterface will never be instantiated directly
https://www.certsguru.com/
D. The plugin will be applied to all implementors of the ActionInterface
Answer: D
Explanation
https://stackoverflow.com/questions/62734221/magento2-writing-plugins-for-interface
Question #:71
In a custom module you are adding a new field to the store configuration. The field will set the value for the
configuration path mycompany/mymodule/myoption.
How do you supply the default value for that configuration option?
Answer: A
Explanation
https://magento.stackexchange.com/questions/173286/magento2-how-to-create-admin-page-with-configuration-field
Question #:72
You add the required configuration to the module’s acl.xml file, but the setting does not seem to work as
expected.
How do you visually check if Magento evaluates your ACL resource as expected?
A. Write a plugin for the class \Magento\Framework\Acl\LoaderInterface::populateAcl() and echo out the
loaded roles
C. In the browser, open the admin User Roles page. Choose a role and inspect the tree of available
resources
D.
https://www.certsguru.com/
D. Inspect
Answer: C
Question #:73
C. By adding the new section into the customer_account table in the database
Answer: D
Question #:74
A. Edit order
B. Refund
C. Reorder
D. Invoice
Answer: C
Question #:75
A custom module must make changes to the schema following each setup:upgrade run. This must be done
after all other module’s schema updates have been applied.
https://www.certsguru.com/
C. Update the module’s setup_priority in etc/modules.xml
Answer: D
Question #:76
You are creating a new indexer which must run after the targetrule_product_rule index process. When you run
bin/magento indexer:reindex, your rule always runs first creating inaccurate data. What is the resolution?
Answer: A
Question #:77
You are developing a new theme which inherits from the Magento_Luma theme.
C. Specify the parent theme in Magento admin > Design > Configuration
Answer: A
Question #:78
How do you pass an array [‘one’, ‘two] as a parameter to you block using the layout XML arguments
directive?
https://www.certsguru.com/
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Question #:79
You are adding a new entry to the backend menu that appears after
You see the existing site map menu item is declared by the node:
What two actions do you take to configure the new menu entry location? (Choose two.)
B. Specify parent=”Magento_Sitemap::catalog_sitemap”
C.
https://www.certsguru.com/
C. Specify parent=”Magento_Backend::marketing_seo”
D. Specify sortOrder=”100”
Answer: C D
Question #:80
You are writing a customization for the customer module. You need to make sure the configuration files from
your module are loaded after the customer module’s configuration.
A. composer.json
B. etc/module.xml
C. etc/config.xml
D. etc/di.xml
Answer: A
Question #:81
There are two different configurable products which both share one variation. The shared variation is
represented by the same simple product.
A customer added both configurables to the cart with the same selected variation?
B. As one line item which lists both configurable products with quantity 1 each
Answer: A
Question #:82
You are adding a child node to the product.info block using the XML:
https://www.certsguru.com/
How will this block be rendered?
Answer: B
Question #:83
The module MyCompany_MyModule will add a new page in the admin interface to display a custom entity in
a grid.
Which two actions are required to make the new page accessible at the
https://your.store.base.url/admin/my_module/custom_entity URL? (Choose two.)
C. Specify the my_module/custom_entity URL using a @route annotation in the action controller execute()
method
Answer: B D
Question #:84
Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)
A. Language
B. Area
https://www.certsguru.com/
C. Store View
D. Store
E. Website
Answer: B C E
Question #:85
A. You create a trait with the common methods and use the trait in the observer classes.
B. You create an abstract class AbstractObserver with the common methods and extend the observer
classes from it.
C. You create a regular class implementing the common functionality as public static methods and call
those from the observers.
D. You create a regular class implementing the common functionality as public methods and use
constructor injection to make them available to the observers.
Answer: D
Question #:86
The module MyCompany_MyModule will add a new page to the admin interface at the URL path
admin/mycompany/entity_grid.
How do you name the file containing the action controller class so the admin router matches the path to the
class?
A. Controller/Adminhtml/Entity/Grid/Index.php
B. Controller/Adminhtml/Mycompany/Entity/Grid.php
C. Controller/Adminhtml/Entity/Grid.php
D. Controller/Adminhtml/Mycompany/Entity_Grid.php
Answer: D
https://www.certsguru.com/
Question #:87
You are creating a new page layout for your custom module.
Answer: B
Question #:88
Answer: B
Question #:89
You are developing a module and need to add another column to a table introduced by another module
MyCompany_MyModule via db schema.
A. Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade
https://www.certsguru.com/
B. Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
D. Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento
setup:upgrade
Answer: A
Question #:90
You have created a module to show manufacturer-list, but in your page need to show Pagination that already
ready in your block. Keeping maintainability in mind, where you call echo $block->getPagerHtml();?
A. /Manufacturer/view/frontend/templates/content.phtml
B. /Manufacturer/Block/Index.php
C. /Manufacturer/Controller/Index/Index.php
D. /Manufacturer/view/frontend/layout/manufacturer_index_index.xml
Answer: A
Question #:91
You have created a new section in system configuration under the Catalog tab:
https://www.certsguru.com/
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Question #:92
You are working on a custom web API endpoint and have configured it in etc/webapi.xml. This config is
cached as part of the config_webservice cache type.
Keeping performance in mind, how do you refresh the cached version of this config using Magento CLI?
https://www.certsguru.com/
A. cache:clean config_webservice
B. cache:refresh config_webservice
C. cache:flush
D. cache:purge
Answer: A
Question #:93
How do you add a foreign key to an existing table created by another module?
A. Create etc/db_schema.xml file with the table node and constraint child node
C. This can only be done with raw SQL in a Schema Patch file
D. Create the etc/db_constraints.xml file and specify foreign key there in the constraint node
Answer: A
Explanation
https://magento.stackexchange.com/questions/192317/magento-2-how-to-add-foreign-key-in-update-schema
Question #:94
You are adding a new menu item to the admin backend which will link to a custom backend page.
What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?
A. action=”adminhtml/mycompany/mymodule/”
B. action=”admin/mycompany/mymodule/”
D.
https://www.certsguru.com/
D. action=”mycompany/mymodule/”
Answer: D
Question #:95
A custom module is performing an optimized custom query for quote items. The class applies the query
customizations on the select object of a quote item collection instance.
You are tasked to resolve an issue where the query sometimes does not deliver the expected results. You have
debugged the problem and found another class is also using a quote item collection and is loading the
collection before the custom module. How do you resolve the issue, keeping maintainability in mind?
C. You inject \Magento\Framework\DB\Select instead of the collection and perform the desired query
independently of the collection.
Answer: A
https://www.certsguru.com/
Question #:96
There is a custom extension called MyCompany_MyModule. It has the following layout customization
declared in MyCompany/MyModule/view/frontend/layout/default.xml:
<referenceContainer name=”content”>
<block class=”Magento\Framework\View\Element\Template”
name=”my.block”
template=”MyCompany_MyModule::my_template.phtml”
cacheable=”false”/>
</referenceContainer>
C. my.block on the default landing page only will be cached using ESI.
D. my.block on the all store front pages will be cached using ESI
Answer: A
Question #:97
You are trying to determine why a product is not appearing in a category. What table does Magento on the
frontend to locate the relationship between a category and its products?
A. catalog_category_product
B. catalog_product_parent
C. catalog_category_product_index
D. catalog_category_product_relationship
Answer: A
Question #:98
A merchant sells shoes with multiple variations such as a color and size. A shoe is represented by a
configurable product. There are seven different colors and four sizes.
https://www.certsguru.com/
What is the minimal amount of simple products that represent a combination of color and size needs to be
created in order to make a shoe salable?
A. Each color and size must have at least one representation, so a minimum of seven products is needed
B. One simple product that represents a combination of color and size is enough
C. A product may be purchased even without any combination available. The color and size may be
adjusted during order fulfillment
Answer: B
Question #:99
You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named
view.phtml in the layout XML.
A. Option A
B. Option B
C. Option C
D. Option D
https://www.certsguru.com/
Answer: D
Question #:100
With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?
A. If no $storeManager is provided, Magento’s code generator creates a shell concrete class based on
\Magento\Store\Model\StoreManagerInterface
C. Magento looks to the di.xml files in the entire system for a preference node for
\Magento\Store\Model\StoreManagerInterface. This class is constructed and injected
Answer: C
Explanation
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html
Question #:101
A. \Magento\Framework\App\ActionInterface
B. \Magento\Frontend\Controller\ActionInterface
C. \Magento\Frontend\Controller\ControllerInterface
D. \Magento\Framework\App\ControllerInterface
Answer: A
Question #:102
https://www.certsguru.com/
You
are customizing the display of product details page. On this page ur customer need to change the url in which
the product category name will be appear as http://mystore.com/women/tops-women/helena-hooded-
fleece.html , Keeping ,maintainability in mind ,How to get product url with category?
A. Admin -> Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> "Use
Categories Path for Product URLs" set to "Yes"
C. $product->setCategoryId($categoryId)->getProductUrl();
Answer: A
Question #:103
A. Customer
B. CMS Page
C. Category
D. Customer Address
Answer: C
Question #:104
You are adding an entry to the backend menu. To do so you open a core etc/adminhtml/menu.xml file as a
reference. In the file you see the node:
A.
https://www.certsguru.com/
A. The menu item will only be visible to users who are assigned to a role with access to the matching ACL
resource
B. The menu item will only be visible if the class method specified by the resource returns a true value
C. The last selected menu item for a user is stored in the DB so the previously visited page can be restored
on the next login
D. The resource is used to locate the correct translation for the attributes listed in title=”…”
Answer: A
Question #:105
A Magento industry partner shipping provider has tasked you to build their integration module called
MyCompany_ShippingProvider.
Where do you define the class that provides options for the select field that enables or disables the provider in
the file etc/adminhtml/system.xml?
A. <option_model>Magento\Config\Model\Config\Option\Yesno</option_model>
B. <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
C. <frontend_model>Magento\Config\Model\Config\Frontend\Yesno</frontend_model>
D. <backend_model>Magento\Config\Model\Config\Backend\Yesno</backend_model>
Answer: B
Question #:106
You have to install a new module on the production environment. All the module is adding a new product
attribute. You enabled maintenance mode, copied the module code, run bin/magento setup:upgrade and
disabled maintenance mode.
B. The new attribute will be invisible on the storefront until the cache is cleaned manually
Answer: B C
https://www.certsguru.com/
Question #:107
Which two ways does Magento persist category relationships in the database? (Choose two.)
Answer: B C
Question #:108
A. Customer address is a flat entity, so all values are stored in the customer_address_entity table
C. Customer address is an attribute of the customer, so it doesn’t have its own attributes
D. Customer address is an EAV entity, so all values are stored in the customer_address_entity table and
related values tables
Answer: D
Question #:109
How many shipping addresses may be selected for an order during the checkout process?
Answer: B
https://www.certsguru.com/
Question #:110
Answer: A
Question #:111
A module you are developing requires the addition of new routes that should be accessible in the store front.
A. etc/frontend/routes.xml
B. etc/frontend/config.xml
C. etc/config.xml
D. etc/routes.xml
Answer: A
Question #:112
A. \Magento\Framework\Api\SearchCriteriaFactory
B. \Magento\Framework\Api\SearchCriteriaBuilder
C. \Magento\Sales\Model\Order\SearchCriteria
D. \Magento\Backend\Api\SearchCriteriaGenerator
Answer: B
https://www.certsguru.com/
Question #:113
You are working on a project that contains a million SKUs. The merchant has requested the product view page
to have a custom color schema and page layout depending on the product price range.
A. Create a custom block which will dynamically choose the appropriate template
B. Specify custom layout update XML in the admin panel for every product
C. Write a Data Patch which will set the appropriate layout update XML for every product record
D. Enable the dynamic product page UI component and configure it to use a different layout per price range
Answer: A
Explanation
https://www.rohanhapani.com/magento-2-change-product-view-page-layout-based-on-price/
Question #:114
Answer: D
Question #:115
A. Online means that a shipment will have a tracking number, and offline means no tracking numbers are
available
B. Online means Magento will use a shipping carrier’s API to obtain rates, offline means Magento will
calculate the rates internally
C. Online means that an item’s shipping will be processed by the merchant, offline means that it will be
https://www.certsguru.com/
C.
processed by the customer
D. Online means that it will be sent to the customer using a shipping carrier, offline means the customer
will pick up the order in person
Answer: B
Question #:116
During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in
the file etc/adminhtml/system.xml:
A. The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue()
with a $scopeType argument of ‘store’.
B. The input field will not be visible if a store view scope is selected in the system configuration
C. The input field will only be visible if a website’s default store scope is selected in the system
configuration
D. The input field will be disabled if a store view scope is selected in the system configuration
Answer: B
Question #:117
You need to control access to a custom controller action. How do you tell Magento about this new control
option?
Answer: A
Question #:118
https://www.certsguru.com/
You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that
MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml
Which two actions are required to ensure the new plugin will execute last? (Choose two.)
Answer: A C
Question #:119
What version constraint for magento/framework do you add to your module’s composer.json file?
A. major
B. minor
C. patch
D. stable
Answer: B
https://www.certsguru.com/
Question #:120
A. app/etc/config.xml
B. app/etc/env.php
C. app/etc/local.xml
D. composer.json
Answer: B
Question #:121
Answer: B
Question #:122
A merchant asks you to create a module that is able to process URLs with a custom structure that can contain
any combination of a product type code, a partial name, and a 4-digit year in any order. The request path will
look like this: /product/:type-code/:name-part/:year Which layer in the Magento request processing flow is
suited for this kind of customization?
A. Front controller
B. Router
C. Action controller
D. HTTP Response
Answer: B
https://www.certsguru.com/
Question #:123
A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals.
Which two actions do you take to make sure the newsletter is sent? (Choose two.)
Answer: B C
Question #:124
You are setting up a brand new Magento installation for a merchant who is migrating from Magento 1 to
Magento 2.
Keeping in mind upgradability and the need to customize, which one do you choose?
Answer: A
Question #:125
You need to find all orders in the processing state. You have written the code:
https://www.certsguru.com/
How do you resolve the exception?
Answer: B
Question #:126
You have been given the task of importing products from an external source. You decide to create a custom
module to do this. The class handling the import creates a product for each record, sets the data on it and saves
it to the database.
What do you inject into a constructor to represent each product you create?
A. \Magento\Catalog\Model\Product
B. \Magento\Catalog\Api\Data\ProductInterfaceFactory
C. \Magento\Catalog\Api\Data\ProductInterface
D. \Magento\Catalog\Model\ProductBuilder
Answer: B
Question #:127
You have added a new attribute origin of the type varchar to the product entity.
Which two calls will filter a product collection with origin set to “California”? (Choose two.)
A. $collection->addFieldToFilter(‘origin’, “California”);
B. $collection->addAttributeToSelect(‘origin’, “California”);
D. $collection->addAttributeToFilter(‘origin’, “California”);
Answer: A D
https://www.certsguru.com/
Question #:128
Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class
responsible for the frontend path /mymodule/custom.
What file contains the controller class for the frontend path /mymodule/custom?
A. Controller/Custom/Index.php
B. Controller/Custom.php
C. Controller/MyModule/Custom/Index.php
D. Controller/Frontend/MyModule/Custom.php
Answer: A
Question #:129
You have created a module with a custom ACL resource and want to restrict access to resources of your
module.
Which three items are restricted based on ACL role permissions? (Choose three.)
A. CLI Commands
B. Webapi resources
C. Storefront login
E. Adminhtml controllers
Answer: B D E
Question #:130
You are building CLI that use the console to create a customer account with our custom command, Adding a
new command to CLI is based on passing on the argument from the XML level to the class. Dependency
Injection comes in handy here. you create the file app/code/Mycompany/Customer/etc/di.xml with the
following content: <type name="---------------------"> </type> What is the correct in below?
A. Magento\Framework\Console\CommandList
B. Magento\Framework\Console
https://www.certsguru.com/
C. Magento\Framework\CommandList
D. Magento\Framework\CommandList\Console
Answer: A
Question #:131
A. Magento does not expose customer information in JavaScript for security reasons
Answer: C
Question #:132
If you want to create layout XML instructions for this controller, what would be the layout XML's filename?
A. mymodule_index_subscribe.xml
B. mymodule_subscribe_[ACTION NAME].xml
C. user_subscriptions_index_subscribe.xml
D. user_subscriptions_subscribe_[ACTION NAME].xml
Answer: A
Question #:133
While reviewing a layout file named sales_order_view.xml you notice the element
https://www.certsguru.com/
<update handle=”customer_account”/>
Answer: C
Explanation
https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/layouts/xml-instructions.html#fedg_layout_xml-instru
Question #:134
You are reviewing a module to some special functionality to the Magento 2 application, You see directory
/Console, What task you think in this directory contain script for this modules?
Answer: A
Question #:135
You need to add the Google Tag Manager (GTM) to every page. What three steps do you take to accomplish
this in MyCompany_MyModule?
B. Create view/frontend/layout/default.xml.
https://www.certsguru.com/
E. Copy vendor/module-catalog/view/template/script.phtml to view/template/script.phtml and add GTM
script.
Answer: A B C
Question #:136
You have created a new product type, sample, and need to customize how it renders on the shopping car
Keeping maintainability in mind, how do you add a new renderer?
B. Override the cart/form.phtml template and add logic for the sample product type.
C. Create the layout file, checkout_cart_index.xml, and reference the checkout.cart.renderers block an
a block with the as="sample" attribute.
D. Create the layout file, checkout_cart_index.xml, and update the cart page's uiComponent to
appropriately render the sample product type.
Answer: A
Question #:137
Answer: D
Question #:138
You are trying to determine why a product is not appearing in a category. What table does Magento on the
frontend to locate the relationship between a category and its products?
A. catalog_category_product
B. catalog_product_parent
C. catalog_category_product_index
D. catalog_category_product_relationship
Answer: A
https://www.certsguru.com/