Magento Final Answer

You might also like

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 7

1) 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?

A. Create a new Magento instance using composer create-project


B. Clone the magento/magento2 GitHub repository
C. Run php bin/magento setup:migrate <path-to-m1-installation> <new-version> command
D. Create a new Magento instance by using the bin/magento install command

Answer: C (IN Pdf)


Correct Answer: A (In other websites (Read Comments)- https://vceguide.com/which-one-
do-you-choose/ )

2) How many shipping addresses may be selected for an order during the checkout process?

A. One shipping address per line item is possible


B. Only one shipping address per order is possible
C. One shipping address per unit of quantity is possible
D. One shipping address per product type is possible

Answer: B (IN Pdf)


Correct Answer: C (In other websites (Read Comments)- https://vceguide.com/how-many-
shipping-addresses-may-be-selected-for-an-order-during-the-checkout-process/ )

3) You have created a new section in system configuration under the Catalog tab:
How do you restrict an access to the section using Magento ACL?

Answer: B (IN Pdf)


Correct Answer: A (In other websites (Read Comments)- https://vceguide.com/how-do-you-
restrict-an-access-to-the-section-using-magento-acl/ )

4) 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

Answer: D (IN Pdf)


Correct Answer: A (In other websites -
https://magento.stackexchange.com/questions/326509/what-is-the-connection-between-
product-attribute-sets-and-categories )
5) 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 selectedlanguage.
Keeping simplicity in mind, how do you add this attribute?

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

Answer: D (IN Pdf)


Correct Answer: B (In other websites (Read Comments) - https://vceguide.com/how-do-you-
add-this-attribute/ )

6) 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’);

Answer: ABD (IN Pdf)


Correct Answer: B, D, E (In other websites (Read Comments) -
https://vceguide.com/which-three-actions-do-you-specify-in-a-modules-data-patch-to-add-a-
customer-notes-attribute/)

7) You added a plugin declaration to MyCompany/MyModule/etc/di.xml:

What will be the effect of this declaration?

A. An exception because plugins must not be applied to the interfaces


B. An exception because of the syntax error in the declaration
C. The plugin will be ignored because ActionInterface will never be instantiated directly
D. The plugin will be applied to all implementors of the ActionInterface

Answer: B (IN Pdf)


Correct Answer: D (In other websites (Read Comments) - https://vceguide.com/what-will-
be-the-effect-of-this-declaration/ , https://stackoverflow.com/questions/62734221/magento2-
writing-plugins-for-interface )

8) 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.
How is this represented in Magento?

A. Using custom options, with rings as simple products


B. Using categories, with each ring size as a separate product
C. Using configurable products, with ring size as an attribute value
D. Using custom options, with rings as bundle products

Answer: C (IN Pdf)


Answer: A (In other websites (Read Comments) - https://vceguide.com/how-is-this-
represented-in-magento/)

9) 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.
How do you implement this, keeping simplicity in mind?

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: D (IN Pdf)


Answer: A (In other websites (Read Comments) - https://vceguide.com/how-do-you-
implement-this-keeping-simplicity-in-mind/ )

10) 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
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

Answer: B (IN Pdf)


Answer: A (In other websites (Read Comments) - https://vceguide.com/how-do-you-
implement-this-keeping-simplicity-in-mind/ )

11) Which two ways does Magento persist category relationships in the database? (Choose two.)

A. Using slash-separated values in the path field


B. in the table catalog_category_index
C. in the parent_id field
D. Using comma-separated values in the parent-ids field

Answer: BC (IN Pdf)


Answer: A, C (In other websites (Read Comments) - https://vceguide.com/which-two-ways-
does-magento-persist-category-relationships-in-the-database/ )

12) You added a new constructor argument to an existing action controller class.
When you reload the page you get a PHP error that the wrong argument is passed to the class.
How do you fix this?

A. Clean the page cache


B. Deploy static content
C. Clean the <magento_root>/generated/ folder
D. Clean the config cache

Answer: A (IN Pdf)


Answer: C (In other websites (Read Comments) - https://vceguide.com/how-do-you-fix-
this/ )

13) The module MyCompany_MyModule provides custom admin interface pages.


Access to these pages should only be granted to specific users.
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 MagentoFrameworkAclLoaderInterface::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

Answer: D (IN Pdf)


Answer: C (In other websites (Read Comments) - https://vceguide.com/how-do-you-
visually-check-if-magento-evaluates-your-acl-resource-as-expected/ )

14) How can you render a text on a page using only layout xml?

Answer: B (IN Pdf)


Answer: C (In other websites (Read Comments) - https://vceguide.com/how-can-you-
render-a-text-on-a-page-using-only-layout-xml/ )

15) You want to declare a block of the type MagentoFrameworkViewElementTemplate with a


template named view.phtml in the layout XML.
What is the correct layout declaration for this?

Answer: C (IN Pdf)


Answer: D (In other websites (Read Comments) - https://vceguide.com/what-is-the-
correct-layout-declaration-for-this/ , https://www.itexams.com/exam/Magento
%202%20Certified%20Associate%20Developer )

16) 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”);

Answer: B,D (IN Pdf)


Answer: A,D (In other websites (Read Comments) - https://vceguide.com/which-two-calls-
will-filter-a-product-collection-with-origin-set-to-california/ )
17) The module MyCompany_MyModule will add a new page in the admin interface to display a
custom entity in a grid.
You created a controller for this grid \MyCompany\MyModule\Controller\Adminhtml\
CustomEntity\Index
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.)

A. Register my_module route for the AdminRouter in


MyCompany/MyModule/etc/adminhtml/di.xml
B. Create a new menu item in MyCompany/MyModule/etc/adminhtml/menu.xml
C. Specify the my_module/custom_entity URL using a @route annotation in the action
controller execute() method
D. Register my_module route in MyCompany/MyModule/etc/adminhtml/routes.xml

Answer: C,D (IN Pdf)


Answer: B,D (In other websites (Read Comments) - https://vceguide.com/which-two-
actions-are-required-to-make-the-new-page-accessible-at-the-https-your-store-base-url-
admin-my_module-custom_entity-url/ , https://www.testsdumps.com/demo/Magento-2-
Associate-Developer.pdf# )

18) What is the difference between online and offline shipping methods?
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

Answer: C (IN Pdf)


Answer: B (In other websites - https://www.marks4sure.com/ad0-e703-adobe-certified-expert-
magento-commerce-developer-questions.html )

19) A custom module needs to log all calls of \Magento\Customer\Api


AddressRepositoryInterface::save().
Which mechanism do you use?
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

Answer: A (IN Pdf)


Answer: D (In other websites (Read Comments) - https://vceguide.com/which-mechanism-do-
you-use/ , https://www.pass4test.com/Magento-2-Associate-Developer-exam-questions.html)

20) 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.
Keeping in mind upgradeability, how is this done?

A. Create a before plugin for \Magento\Customer\Api\AccountManagementInterface’s authenticate


method
B. Create a mutation of a CustomerInterface object to intercept the username and password
C. Create an event observer for the user_save_after observer
D. Override \Magento\Customer\Controller\AccountController.php

Answer: C (IN Pdf)


Answer: A (In other websites (Read Comments) - https://vceguide.com/how-is-this-done-8/ )

21) You are building a report using complex SQL aggregations to locate the required data.
In what type of class do you put these SQL statements?

A. Resource model
B. Repository
C. Model
D. Helper

Answer: C (IN Pdf)


Answer: A (In other websites (Read Comments) - https://vceguide.com/what-type-of-class-do-
you-put-these-sql-statements/ )

22) A module declares the route:


What is the layout handle of the storefront path /custom/feature/?

A. mymodule_feature
B. custom_feature
C. mymodule_feature_index
D. custom_feature_index

Answer: B (IN Pdf)


Answer: C (In other websites (Read Comments) - https://vceguide.com/what-is-the-layout-
handle-of-the-storefront-path-custom-feature/ , https://www.exam4training.com/what-is-the-
layout-handle-of-the-storefront-path-custom-feature/ )

23) You are adding a new entry to the backend menu that appears after
Marketing > SEO & Search > Site Map
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.)

A. Specify item XML in the file etc/adminhtml/menu/marketing/seo/menu.xml


B. Specify parent=”Magento_Sitemap::catalog_sitemap”
C. Specify parent=”Magento_Backend::marketing_seo”
D. Specify sortOrder=”100”

Answer: A,D (IN Pdf)


Answer: C,D (In other websites (Read Comments) - https://vceguide.com/what-two-actions-
do-you-take-to-configure-the-new-menu-entry-location/ , https://www.marks4sure.com/ad0-
e703-adobe-certified-expert-magento-commerce-developer-questions.html )

24) How do you add a new link into the My Account sidebar?
A. By creating a new UI component
B. By creating a child of the My Account UI component
C. By adding the new section into the customer_account table in the database
D. By using a layout update

Answer: C (IN Pdf)


Answer: D (In other websites (Read Comments) - https://vceguide.com/how-do-you-add-a-
new-link-into-the-my-account-sidebar/ , https://m2exam.decimadigital.com/magento-2-
certification-question-list/how-to-add-a-new-link-to-the-customer-account-sidebar )

25) What are two functions of a resource model? (Choose two.)

A. It executes create, retrieve, update and delete actions for an entity


B. It loads lists of entity models
C. It is made available in the Magento API for the purpose of data manipulation
D. It maps an entity to one or more database rows

Answer: B,D (IN Pdf)


Answer: A,D (In other websites (Read Comments) - https://vceguide.com/what-are-two-
functions-of-a-resource-model/ , https://www.exam4training.com/what-are-two-functions-of-
a-resource-model-choose-two/ )

26) 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?
How will they be displayed?

A. As two separate line items with quantity 1 each


B. As one line item which lists both configurable products with quantity 1 each
C. As one line item of the first product with quantity 2
D. As one line item of the second product with quantity 2

Answer: B (IN Pdf)


Answer: A (In other websites (Read Comments) - https://vceguide.com/how-will-they-be-
displayed/ , https://www.exam4training.com/a-customer-added-both-configurables-to-the-
cart-with-the-same-selected-variation/ )

27) Magento allows you to specify custom values per store for product attributes created in
the admin panel.
Which architectural pattern makes it possible?

A. Store Manager
B. Extension Attribute
C. Entity Attribute Value
D. Dependency Injection

Answer: B (IN Pdf)


Answer: C (In other websites (Read Comments) - https://vceguide.com/which-architectural-
pattern-makes-it-possible/ )

You might also like