Zend certified PHP/Magento developer

Association developer certification magento 2

QUESTION 1

You got a notification about error that occurred on a production environment. The merchant gave you the error identifier.

How do you find the error message based on the identifier?

A. An error is written to the var/log/exception.log file including the 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

QUESTION 2

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

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

QUESTION 3 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

QUESTION 4

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.
How do you do that?

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

QUESTION 5

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

QUESTION 6

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. What two risks does this process pose? (Choose two.)

A.It will clean all caches which will cause a performance degradation

B.The new attribute will be invisible on the storefront until the cache is cleaned manually

C.It will void all active sessions

D.It will clean static assets from the pub/static folder

QUESTION 7

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:db-schema:upgrade

C. Run a command: 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

QUESTION 8

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

QUESTION 9

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. What is a consequence of this setup?

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

I got these questions from the some pdfs . But I am not sure the answers. Please help. Thanks in advance.