While developing a module you need to modify an existing Data Patch.
How can you force Magento to execute an existing Data Patch file again?
A. By removing the Data Patch, running the command: bin/magento setup:db-data:upgrade, then copying the file back and running the command again
B. By changing the version of the Data Patch in the getVersion method
C. By modifying the data_version value in the setup_module table
D. By deleting the record with the Data Patch class name from the table patch_list table
正解:D
質問 2:
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');
正解:A,B,D
質問 3:
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 one line item of the second product with quantity 2
B. As one line item of the first product with quantity 2
C. As two separate line items with quantity 1 each
D. As one line item which lists both configurable products with quantity 1 each
正解:C
質問 4:
A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?
A. By altering the customer_entity table, adding the field billing_address2, and customizing both My Account and Checkout functionality to use that new field
B. By adding the attribute like customer_address_billing2 and customizing both My Account and Checkout functionality to use that new attribute
C. By changing the System Configuration setting: Customer>Allow multiple billing addresses to Yes
D. This is out-of-the box functionality
正解:D
質問 5:
What is the connection between product attribute sets and categories?
A. Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
B. Categories have no connection to product attribute sets, and any product can be assigned to any 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
正解:B
質問 6:
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. Make sure bin/magento cron:run is added to the system crontab
C. Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml
D. Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml
正解:B,C
質問 7:
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 <magento_root>/generated/ folder
B. Clean the page cache
C. Deploy static content
D. Clean the config cache
正解:A
解説: (Pass4Test メンバーにのみ表示されます)
質問 8:
In a code review of a merchant's site you have discovered that there are multiple observers for the checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the others being executed before it is called.
What risk does this pose, and how can it be mitigated?
A. Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be re-worked using plugins
B. Magento only supports one observer per event. These observers will need to be combined into a single point of customization.
C. There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be changed.
D. Event observers are fired in alphabetical order of the observer name. There is no risk here.
正解:A
铃木** -
出題確率の高いテーマをコンパクトにまとめ、最小限の対策で合格をめざすAD0-E702参考書だぜ