Black Friday Sale - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 65percent

Welcome To DumpsPedia

Magento-2-Certified-Associate-Developer Sample Questions Answers

Questions 4

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?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 5

Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)

Options:

A.

Language

B.

Area

C.

Store View

D.

Store

E.

Website

Buy Now
Questions 6

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

Options:

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)

Buy Now
Questions 7

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?

Options:

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

Buy Now
Questions 8

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:

What is the result of specifying resource=”Magento_Catalog::catalog”?

Options:

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=”…”

Buy Now
Questions 9

A module declares the route:

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

Options:

A.

mymodule_feature

B.

custom_feature

C.

mymodule_feature_index

D.

custom_feature_index

Buy Now
Questions 10

A merchant gives you the module MyCompany_MyModule to install.

How do you identify which REST endpoints are supported by the module?

Options:

A.

REST endpoints are declared in etc/webapi_rest/di.xml

B.

Every public method of every interface in the Api folder automatically is exposed as a REST endpoint

C.

REST endpoints are declared in etc/rest.xml

D.

REST endpoints are declared in etc/webapi.xml

Questions 11

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

Options:

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”

Buy Now
Questions 12

You are reviewing a Magento module and see a directory named Service.

What can you determine from this directory’s name?

Options:

A.

It is where the API response cache is stored

B.

It is where API-related configuration resides

C.

It is where the module’s service contracts are stored

D.

You need to review the files in this folder to understand its purpose

Buy Now
Questions 13

A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.

You decided to implement an observer for customer_save_after_data_object event.

In which file do you declare the observer?

Options:

A.

etc/webapi_rest/events.xml

B.

etc/adminhtml/events.xml

C.

etc/webapi/rest_events.xml

D.

etc/events.xml

Buy Now
Questions 14

What scopes are available for customer attributes?

Options:

A.

Global only

B.

Website only

C.

Global and Website

D.

Global, Website and Store

Buy Now
Questions 15

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?

Options:

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

D.

A simple product for every combination must be created

Buy Now
Questions 16

What will be the result of calling the save() method on a collection instance?

Options:

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

Buy Now
Questions 17

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.

How is this accomplished?

Options:

A.

Write a plugin intercepting \Magento\Setup\Model\Installer::handleDBSchemaData

B.

Create an UpgradeSchemaAfter class which implements InstallSchemaInterface

C.

Update the module’s setup_priority in etc/modules.xml

D.

Create a Recurring class which implements InstallSchemaInterface

Buy Now
Questions 18

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?

Options:

A.

\Magento\Catalog\Model\Product

B.

\Magento\Catalog\Api\Data\ProductInterfaceFactory

C.

\Magento\Catalog\Api\Data\ProductInterface

D.

\Magento\Catalog\Model\ProductBuilder

Buy Now
Questions 19

A module you are developing requires the addition of new routes that should be accessible in the store front.

Where do you define your module’s frontName?

Options:

A.

etc/frontend/routes.xml

B.

etc/frontend/config.xml

C.

etc/config.xml

D.

etc/routes.xml

Buy Now
Questions 20

A client has asked you to include category url keys in product URLs.

How is this done?

Options:

A.

Create an observer for controller_action_postdispatch_catalog_product_view

B.

This is not possible because products can belong to multiple categories

C.

Set the configuration value of catalog/seo/product_use_categories to Yes

D.

Create an after plugin on \Magento\UrlRewrite\Controller\Router::generateRewrite

Buy Now
Questions 21

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

Options:

A.

$collection->addFieldToFilter(‘origin’, “California”);

B.

$collection->addAttributeToSelect(‘origin’, “California”);

C.

$collection->joinAttribute(‘origin’, ‘catalog_product/origin’, ‘origin’, ‘California”);

D.

$collection->addAttributeToFilter(‘origin’, “California”);

Buy Now
Questions 22

What happens when a category’s is_anchor attribute is set to 1?

Options:

A.

Products without a specified category will be associated with this category

B.

The customer will see all products from all children of the category

C.

This is the default category for a website

D.

The category will always be visible in the menu

Buy Now
Questions 23

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?

Options:

A.

Resource model

B.

Repository

C.

Model

D.

Helper

Buy Now
Questions 24

How do you add a foreign key to an existing table created by another module?

Options:

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

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

Questions 25

What is a valid use case for an around plugin?

Options:

A.

The execution of the pluginized method must be suppressed

B.

The arguments of the before plugins must be modified

C.

The arguments of the after plugins must be modified

D.

The execution of the before and after plugins must be suppressed

Buy Now
Questions 26

You want to remove a column introduced by a third-party extension via declarative schema.

How do you do that?

Options:

A.

Create the etc/db_schema.xml file and specify disable=”true” on the column

B.

Modify the original etc/db_schema.xml file and remove the column from there

C.

Create a SchemaPatch file and remove the column programmatically

D.

Copy the etc/db_schema.xml file into your module and remove the column from your copy

Buy Now
Questions 27

In layout files you can change al element’s order on a page. This can be done using one of the following:

  • instruction
  • before and after element attributes?

How are two methods different?

Options:

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

Buy Now
Questions 28

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?

Options:

A.

In the config/default/mycompany/mymodule/myoption node in the etc/config.xml file

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

Questions 29

Magento allows you to specify custom values per store for product attributes created in the admin panel.

Which architectural pattern makes it possible?

Options:

A.

Store Manager

B.

Extension Attribute

C.

Entity Attribute Value

D.

Dependency Injection

Buy Now
Questions 30

How can you access the select query of a collection?

Options:

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

Buy Now
Exam Code: Magento-2-Certified-Associate-Developer
Exam Name: Magento 2 Certified Associate Developer Exam
Last Update: Nov 21, 2024
Questions: 103
$57.75  $164.99
$43.75  $124.99
$36.75  $104.99
buy now Magento-2-Certified-Associate-Developer