Certbus > Magento > Magento Certification > MAGENTO2-CERTIFIED-ASSOCIATE-DEVELOPER > MAGENTO2-CERTIFIED-ASSOCIATE-DEVELOPER Online Practice Questions and Answers

MAGENTO2-CERTIFIED-ASSOCIATE-DEVELOPER Online Practice Questions and Answers

Questions 4

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

A. Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/ di.xml

B. Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml

C. Make sure bin/magento cron:run is added to the system crontab

D. Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml

Browse 103 Q&As
Questions 5

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

Browse 103 Q&As
Questions 6

How can you access the select query of a collection?

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

Browse 103 Q&As
Questions 7

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

Browse 103 Q&As
Questions 8

How does Magento store customer address attribute values?

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

Browse 103 Q&As
Questions 9

You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.

How do you do that?

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:dbschema:upgrade

C. Run a command: bin/magento setup:db-schema:upgrade [table]

D. Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade

Browse 103 Q&As
Questions 10

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

Browse 103 Q&As
Questions 11

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

Browse 103 Q&As
Questions 12

A merchant is interested in setting different prices for the same products in different store scopes. What do you reply to this inquiry?

A. The prices can only be scoped per website or globally

B. The prices can be scoped per store

C. The price scope can be set to store but this will lead to performance degradation of category pages

D. The prices do not support scopes

Browse 103 Q&As
Questions 13

Which two tasks are supported by Magento CLI? (Choose two.)

A. Customer password reset

B. Clearing cache

C. Codebase deployment from developer machine to staging server

D. Administrator account creation

Browse 103 Q&As
Questions 14

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

Browse 103 Q&As
Questions 15

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

A. Language

B. Area

C. Store View

D. Store

E. Website

Browse 103 Q&As
Questions 16

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 /generated/ folder

D. Clean the config cache

Browse 103 Q&As
Questions 17

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");

Browse 103 Q&As
Questions 18

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.

What is causing this?

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

Browse 103 Q&As
Exam Name: Magento 2 Certified Associate Developer
Last Update: Apr 23, 2024
Questions: 103 Q&As

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99