Keeping simplicity in mind, how do you implement this?

You are working on a Magento module for a merchant that does business in the UK. This module exposes a REST API endpoint for sending text messages to customers. There is an app based on this REST API which allows admin users to stay in touch with the customers. You would like to restrict the admin’s ability to send text messages after work hours.

Keeping simplicity in mind, how do you implement this?
A . Use the built-in scheduled ACL functionality to configure allow-deny rules in the admin panel
B. Add the check directly to the service method implementation
C. Implement a cron job to change the admin permissions twice a day for everyone who has these permissions set
D. Add aclResolver="MycompanyMyModuleModelPathToAc1Resolver" declaration for the relevant methods in webapi. xbI

Answer: D

What is the possible way to remove all HTML outputs of the review module, from the frontend and backend?

Suppose you are asked to disable/remove the customer review related functionalities. You can not disable the review module directly because the customer module depends on it.

What is the possible way to remove all HTML outputs of the review module, from the frontend and backend?
A . Turn-off Review module output globally by extending <Magento_install_dir>/vendor/magento/module-backend/etc/config.xml
B. Turn-off Review module output globally by extending <Magento_install_dir>/vendor/magento/module-backend/etc/module.xml
C. Create plugin or Override the class MagentoFrameworkViewElementAbstractBlock and toHtml() method, and implement the logic to return empty data in case of review module’s block instance is present.
D. Create plugin or Override the class MagentoBackendBlockTemplate and isOutputEnabled() method, and implement the logic to return false value in case of review module’s block instance is present.

Answer: A

How do you load the CMS block with the right Staging version?

You are working on a custom page where the content of a CMS block has to be rendered. You know the merchant is using Staging for CMS blocks. In your code you have access to the $repository object which is an instance of MagentoCmsApiBlockRepositoryInterface. $blockld which is the original block ID, and $current Version which is the current Staging version.

How do you load the CMS block with the right Staging version?

A)

B)

C)

D)

A . Option A
B. Option B
C. Option C
D. Option D

Answer: D

Suppose in a store there are 500 categories and it’s increasing as per the need. Let’s say your frontend developer asked you to modify the header and include CSS files on some specific category pages based on the custom category attribute selection from backend.

Suppose in a store there are 500 categories and it’s increasing as per the need. Let’s say your frontend developer asked you to modify the header and include CSS files on some specific category pages based on the custom category attribute selection from backend.

What should be the acceptable and easiest way to do this, so that no new file creation and code update will be required after implementation:
A . create a new layout XML file for the category called catalog_category_view.xml and add the layout modification code
B. create a new layout XML file for the category called catalog_category_view_selectable_<Category ID>_CustomLayout.xml and assign it to the needed categories from backend, and add the layout modification code in it.
C. create a custom layout handle for the category using observer layout_load_before and add the layout modification code
D. create a custom layout handle for the category using observer layout_load_after and add the layout modification code

Answer: C

How does Magento store the IDs of updated products for reindex in "Update on Schedule" mode?

You are working on a project where many catalog managers often change products in the admin panel.

The merchant is considering changing the indexers mode to "Update on Schedule" from "Update on Save" to achieve better performance. However, the merchant is concerned about data consistency and the probability of the scheduled updates being lost.

How does Magento store the IDs of updated products for reindex in "Update on Schedule" mode?
A . Magento is gathering updated IDs using catalog_product_save_commit_after events and publishes them into the Message Queue.
B. Magento sets a reindex_required flag on updated products and a later reindex run by the cron will pick up IDs based on that flag.
C. Using the Staging update scheduled for every minute, which includes modified products, Magento will automatically reindex affected products when the update is applied.
D. Magento enables database triggers which collect updated IDs and saves them in special changelog tables.

Answer: C

What do you do?

You want to run a script each time after all schema installation and schema upgrade scripts have executed, but before data setup scripts execution.

What do you do?
A . You need to run bin magento module:recurring MyCompanyJlyModule each time after bin magento setup:update
B. Create a Recurring, php Script in the MyCompany MyModule Setup folder
C. Create a RecurringData. php Script in the MyCompany MyModule Setup folder
D. Add an event observer for the event setup_upgrade_schema_after

Answer: D

What is the reason for this?

A merchant complains about the related accessory products, which they assigned to the virtual product, not being visible on the store front.

What is the reason for this?
A . Related products association must be explicitly activated in the admin panel
B. Browser cache refresh is required
C. Virtual products do not support related products
D. Related products are out of stock

Answer: A

What two ways are used to assign migrated customers with a female gender to the segment?

A merchant has created a segment that applies to registered customers whose gender is female. You then migrate customers by copying data directly from one database to another.

What two ways are used to assign migrated customers with a female gender to the segment?
A . They will be automatically assigned by a cron job at the scheduled time
B. Run bin Mgento index:reinde. customer_segment
C. Click on the Refresh Segment Data button in the Admin
D. Re-save the customer segment in the Admin

Answer: B,C

What will be the effect on the attribute?

You are working on a module MyCompany_MyModule which adds a select attribute with a few options using the MagentoEavSetupEavSetup: :addAttribute() method in data in data install script.

There is no uninstall script. While debugging, you have uninstalled the module with the command:

bin magento module:uninstall MyCompany_MyModule

Then you reinstalled the module.

What will be the effect on the attribute?
A . The attribute remains the same but the attribute options will be duplicated
B. The attribute is deleted and created again
C. The attribute is updated when attribute options differ
D. A duplicate attribute will be created with a different attribute code

Answer: A