Website: Vce To PDF Converter: Facebook: Twitter:: Magento 2 Certified Associate Developer - Vceplus.Premium - Exam.103Q
Website: Vce To PDF Converter: Facebook: Twitter:: Magento 2 Certified Associate Developer - Vceplus.Premium - Exam.103Q
Website: Vce To PDF Converter: Facebook: Twitter:: Magento 2 Certified Associate Developer - Vceplus.Premium - Exam.103Q
103q
Number: Magento2Developer
Passing Score: 800
Time Limit: 120 min
File Version: 1.0
Website: https://vceplus.com
VCE to PDF Converter: https://vceplus.com/vce-to-pdf/
Facebook: https://www.facebook.com/VCE.For.All.VN/
Twitter : https://twitter.com/VCE_Plus
Version 1.0
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Exam A
QUESTION 1
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 2 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?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 3 How many shipping addresses may be selected for an order during the
checkout process?
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://docs.magento.com/m2/ce/user_guide/sales/checkout-step1-shipping.html
QUESTION 4
You have created a new section in system configuration under the Catalog tab:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
How do you restrict an access to the section using Magento ACL?
A.
B. C.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.mageplaza.com/magento-2-module-development/magento-2-acl-access-control-lists.html
QUESTION 5 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.)
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 6 What is the connection between product attribute sets
and categories?
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
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.cloudways.com/blog/configuring-product-attribute-sets-in-magento/
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
Correct Answer: C
Section: (none)
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Reference: https://mage2.pro/t/topic/610
QUESTION 8
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.
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/202403/creating-a-new-container-and-placing-it-where-i-want-in-magento-2
QUESTION 9
Assume that $collection is a new instance of a class that extends
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids.
How do you select a list of records from the database where the record ids are in the $ids list?
A. $collection->addFieldToFilter(‘record_id’,[‘in’=>$ids]);
B.
C. $collection->in($ids);
D. $collection->filterIn($ids);
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/121040/how-to-get-product-collections-by-set-of-ids-in-magento-2
QUESTION 10
While reviewing a layout file named sales_order_view.xml you notice the element <update
handle=”customer_account”/>
Correct Answer: D
Section: (none)
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/236009/what-is-update-handle-customer-account
QUESTION 11
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.
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 12 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
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
Reference: https://inchoo.net/magento-2/how-to-create-a-basic-module-in-magento-2/
A. Customer address is a flat entity, so all values are stored in the customer_address_entity table
B. Customer address is not an entity, so its properties are customer attributes
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
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 14
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
B. Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
C. Run a command: bin/magento setup:db-schema:upgrade <table> <column definition>
D. Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 15
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
B. Use a Data Patch to create a new EAV attribute
C. Add a new column to the catalog_product_entity table using declarative schema
D. Use the admin panel to create a new extension attribute
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 16
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
B. This setup will throw an IllegalStateException
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
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/259547/how-to-a-third-party-module-uses-a-layout-update-that-changes-the-template-path
QUESTION 17
You are adding a child node to the product.info block using the XML:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
C. The layout is invalid since block elements cannot be nested
D. Automatically if the block class Custom implements the _toHtml method
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/49361/how-to-put-my-block-in-catalog-product-view-page
QUESTION 18
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.)
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 19
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.
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.jsD. https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js-resources.html
QUESTION 20
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 configurationD. The input field will be disabled if a store view scope is selected in the system configuration
Correct Answer: B
Section: (none)
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Reference: https://www.mageplaza.com/magento-2-module-development/create-system-xml-configuration-magento-2.html
QUESTION 21
You need to find all orders in the processing state. You have written the code:
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 22 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’]);
B. $customerSetup->addAttribute(‘customer’, ‘notes’, $options);
C. $customerSetup->getConnection()->addColumn(‘customer_entity’, ‘notes’, $columnSpecs);
D. $notesAttribute->setData(‘used_in_forms’, [‘adminhtml_customer’]);
E. $customerSetup->addAttributeToSet(‘customer’, $attributeSetIdCustomer, $groupId, ‘notes’);
Explanation/Reference:
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. It will save the select query to the cache
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/259336/how-to-call-save-method-in-collection-instance
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 24
How do you pass an array [‘one’, ‘two] as a parameter to you block using the layout XML arguments directive?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html
QUESTION 25 You are developing a new theme which inherits from the
Magento_Luma theme.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.mageants.com/blog/how-to-create-custom-theme-in-magento-2.html
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.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
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
D. Use composer CLI to pull the code from MyCompany’s repository
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 27 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
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/256268/how-to-trigger-observer-by-rest-api
QUESTION 28 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
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.mageplaza.com/magento-2-module-development/magento-2-routing.html
A. \Magento\Framework\Api\SearchCriteriaFactory
B. \Magento\Framework\Api\SearchCriteriaBuilder
C. \Magento\Sales\Model\Order\SearchCriteria
D. \Magento\Backend\Api\SearchCriteriaGenerator
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php
QUESTION 30 Which method of a Magento resource model will remove a record from
the database?
A. remove
B. erase
C. clean
D. delete
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/123840/how-to-use-resource-model-delete?rq=1
QUESTION 31
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
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/373/magento-observer-events-order-of-operations
QUESTION 32
You have created a module controller that responds to the following URL: /mycompany/product/load/id/123.
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)
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/94851/magento2-how-to-load-product-by-id
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Global only
B. Website only
C. Global and Website
D. Global, Website and Store
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/258212/which-entity-allows-scoped-attributes
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html
QUESTION 35
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
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.simicart.com/blog/magento-create-controller/
QUESTION 36 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/?
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. action=”adminhtml/mycompany/mymodule/”
B. action=”admin/mycompany/mymodule/”
C. It is not possible without extending the adminhtml route in routes.xml
D. action=”mycompany/mymodule/”
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/92236/magento-2-custom-admin-action-redirected-to-dashboard
QUESTION 37
You added a plugin declaration to MyCompany/MyModule/etc/di.xml:
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 38
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. etc/events.xml
C. etc/config.xml
D. etc/frontend/events.xml
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/128548/trigger-event-after-an-order-has-been-created-saved/128565
QUESTION 39 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.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. Using custom options, with rings as bundle products
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 40 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
D. System configuration sections
E. Adminhtml controllers
Explanation/Reference:
Reference: https://www.mageplaza.com/magento-2-module-development/magento-2-acl-access-control-lists.html
QUESTION 41 A merchant is interested in setting different prices for the same products in different
store scopes.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.quora.com/How-can-I-set-up-different-prices-for-the-same-product-per-Magento-s-Store-View-Im-using-Magento-2-2
Correct Answer: D
Section: (none)
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Reference: https://stackoverflow.com/questions/55337322/what-is-the-use-of-service-directory-in-magento-2
QUESTION 43 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
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html
QUESTION 44
You got a notification about error that occurred on a production environment. The merchant gave you the error identifier.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 45
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 B.
In your template, add the following:
$orderRepository=ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
C. In your block, add a method with the following: return ObjectManager::getInstance()-
>get(OrderRepositoryInterface::class); D. In your template, add the following:
$orderRepository = new OrderRepository();
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
What is the primary difference between container and block elements?
A. They extend different abstract classes
B. A container’s children are rendered automatically
C. Only containers can be removed by name or alias
D. A block’s position within the layout can be altered
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/256478/what-is-the-functional-difference-of-block-container-in-magento-2
QUESTION 47 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
C. This is not possible in a native Magento instance and requires customization
D. You create a role with access to the system configuration pages and assign it to all users except the sales managers
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
A. Magento does not expose customer information in JavaScript for security reasons
B. By sending an AJAX request to the url: /customer/account/info/?json=1
C. By using customerData.get(‘customer’) call, where customerData is an instance of Magento_Customer/js/customer-dataD. Customer information is available in localStorage and be retrieved by calling
window.localStorage.getItem(‘customer’)
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://belvg.com/blog/customer-data-management-in-magento-2.html
QUESTION 49
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:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
A. Edit order
B. Refund
C. Reorder
D. Invoice
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://docs.magento.com/m2/ce/user_guide/sales/order-processing.html
How can you force Magento to execute an existing Data Patch file again?
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
C. By changing the version of the Data Patch in the getVersion method
D. By modifying the data_version value in the setup_module table
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://markshust.com/2019/02/19/create-product-attribute-data-patch-magento-2.3-declarative-schema/
QUESTION 52 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.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 53
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
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
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/102922/programmatically-create-a-simple-product-in-magento-2
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.magestore.com/magento-2-tutorial/3464-2/
QUESTION 55
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
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
A. Create etc/db_schema.xml file with the table node and constraint child node
B. Run the command bin/magento setup:db-schema:upgrade <table> <constraint declaration>
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
Correct Answer: B
Section: (none)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation
Explanation/Reference:
A. Customer
B. CMS Page
C. Category
D. Customer Address
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/258212/which-entity-allows-scoped-attributes
QUESTION 58
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.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.pierrefay.com/magento2-training/install-upgrade-setup.html
QUESTION 59 Which two ways does Magento persist category relationships in the
database? (Choose two.)
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 60 Which three scopes can be used to set different System Configuration values in Magento?
(Choose three.)
A. Language
B. Area
C. Store View
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. Store
E. Website
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-config-mgmt-set.html
QUESTION 61 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>
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout-add-custom-carrier.html
A. app/etc/config.xml
B. app/etc/env.php
C. app/etc/local.xml
D. composer.json
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://amasty.com/knowledge-base/magento-2-admin-url.html
When you reload the page you get a PHP error that the wrong argument is passed to the class.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 64
The module MyCompany_MyModule provides custom admin interface pages.
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
B. Inspect the output of the CLI command bin/magento admin:role:resources – all
C. In the browser, open the admin User Roles page. Choose a role and inspect the tree of available resources
D. Inspect the response of a GET request to the webapi endpoint http://example.com/rest/V1/acl/resources
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 65
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:
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
B.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
C.
D.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 67
In layout files you can change al element’s order on a page. This can be done using one of the following:
<move> instruction before and
after element attributes?
A. They are the same, both provide access to the same functionality
B. Elements are renamed by default when using the move instruction
C. The move instruction allows altering an element’s parent node
D. Before and after attributes can only be used with referenceContainer and referenceBlock
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html
QUESTION 68
You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
What is the correct layout declaration for this? A.
B.
C.
D.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.mageplaza.com/magento-2-module-development/view-block-layout-template-magento-2.html
QUESTION 69 How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info
using layout XML? A.
B. C.
D.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/219813/magento2-how-to-add-custom-block-on-product-page
QUESTION 70 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
B. The string value of \Zend_Json::encode()
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
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.brainacts.com/blog/how-to-return-a-json-response-from-a-controller-in-magento-2
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 72
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
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://medium.com/@kangpaper/crud-models-in-magento-2-4e031861909b
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 73 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”);
C. $collection->joinAttribute(‘origin’, ‘catalog_product/origin’, ‘origin’, ‘California”); D. $collection->addAttributeToFilter(‘origin’, “California”);
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 74
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?
A. cache:clean config_webservice
B. cache:refresh config_webservice
C. cache:flush
D. cache:purge
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 75
You are implementing a custom module MyModule, which provides an implementation of \Psr\Log\LoggerInterface called \MyCompany\MyModule\Logger.
Keeping upgradability in mind, how do you make \MyCompany\MyModule\Logger the default implementation of the LoggerInterface globally?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://inchoo.net/magento-2/magento-2-logging/
QUESTION 76
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?
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
B. In the system/mycompany/group/mymodule/field/myoption node in the etc/system.xml file
C. In the menu/default/section/group/field node in the file etc/adminhtml/menu.xml
D. In the system/section/group/field/value node in the etc/adminhtml/system.xml file
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 77 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.)
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 78 How do you persist an entity
to the database?
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.human-element.com/magento-2-persisting-models-to-the-database
QUESTION 79
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.
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 fulfillmentD. A simple product for every combination must be created
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 80
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
C. The plugin implementation is skipping the execution of its callable argument
D. The plugin implementation overlooked using the AbstractPlugin parent class
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://github.com/magento/magento2/issues/11699
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 82
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
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/mod_depend.html
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 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
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://amasty.com/blog/shipping-magento-2-guide/
A. An observer on the customer_address_repository_save event, which is automatically fired for every repository save
B. A proxy configured to intercept all calls to any public method and log them
C. An extension attribute configured in the extension_attributes.xml
D. A plugin declared for the save() method
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 85
A merchant gives you the module MyCompany_MyModule to install.
How do you identify which REST endpoints are supported by the module?
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 86
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.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 87 You are building a report using complex SQL aggregations to locate
the required data.
A. Resource model
B. Repository
C. Model
D. Helper
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 88
You have configured an event observer to watch the checkout_submit_all_after event using this XML:
B.
C.
D.
Correct Answer: B
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: (none)
Explanation
Explanation/Reference:
QUESTION 89 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 fieldD. This is out-of-the box functionality
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://dev.to/asrar7787/magento-2-theme-what-is-etc-view-xml-3hki
QUESTION 91
A module declares the route:
A. mymodule_feature
B. custom_feature
C. mymodule_feature_index
D. custom_feature_index
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 92 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.)
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.mageplaza.com/magento-2-module-development/create-admin-menu-magento-2.html
QUESTION 93 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>
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.magestore.com/magento-2-tutorial/file-upload-in-magento-2-store-configuration/
Correct Answer: B
Section: (none)
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://webkul.com/blog/account-navigation-link-magento2/
QUESTION 96
The constructor function for \Magento\Catalog\Model\Category contains this excerpt:
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
B. Magento finds all classes that implement \Magento\Store\Model\StoreManagerInterface (ordered alphabetically) and injects the first class.
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
D. Magento throws an exception because you cannot instantiate an interface
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 97
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. 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 loginD. The resource is used to locate the correct translation for the attributes listed in title=”…”
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/204879/consumer-is-not-authorized-to-access-resources-magento-2
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/persist_layer.html
QUESTION 99 You are working on a Magento store which will be selling in two countries. Each country has its own set of
payment methods.
Explanation/Reference:
QUESTION 100 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?
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://firebearstudio.com/blog/the-complete-guide-to-magento-2-configurable-products.html
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 101 What is the relationship between products and
categories in Magento?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 102 Magento allows you to specify custom values per store for product attributes created in
the admin panel.
A. Store Manager
B. Extension Attribute
C. Entity Attribute Value
D. Dependency Injection
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/attributes.html
QUESTION 103 A client has asked you to include category url keys
in product URLs.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Reference: https://magento.stackexchange.com/questions/123553/how-to-add-the-sku-to-the-url-key-magento-2/250339
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com