Which three actions do you specify in a module’s Data Patch to add a customer notes attribute?

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

April 11, 2021 No Comments READ MORE +

Keeping maintainability in mind, how do you build this into Magento?

You are building an tool that imports products from an ERP. There are 20 columns of additional information that are associated with each product. This extra information must also be associated with an update time to know when to refresh the data. Keeping maintainability in mind, how do you build...

April 11, 2021 No Comments READ MORE +

How do you select a list of records from the database where the record ids are in the $ids list?

Assume that $collection is a new instance of a class that extends MagentoFrameworkModelResourceModelDbCollectionAbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list? A . Option AB . Option BC . Option CD...

April 10, 2021 No Comments READ MORE +

How do you specify the class that will process the uploaded file?

A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added. How do you specify the class that will process the uploaded file?A . <upload_model>MagentoConfigModelConfigUploadFile</upload_model>B...

April 10, 2021 No Comments READ MORE +

You have created a module to show manufacturer-list, but in your page need to show Pagination that already ready in your block. Keeping maintainability in mind, where you call echo $block->getPagerHtml();?

You have created a module to show manufacturer-list, but in your page need to show Pagination that already ready in your block. Keeping maintainability in mind, where you call echo $block->getPagerHtml();?A . /Manufacturer/view/frontend/templates/content.phtmlB . /Manufacturer/Block/Index.phpC . /Manufacturer/Controller/Index/Index.phpD . /Manufacturer/view/frontend/layout/manufacturer_index_index.xmlView AnswerAnswer: A

April 10, 2021 No Comments READ MORE +

Which two methods will load the product model by ID as specified in the URL?

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.)A . MagentoCatalogModelResourceModelProduct::load($productModel, $id)B . MagentoCatalogModelResourceModelProductCollection::load()->fetchById($id)C . MagentoCatalogModelResourceModelProductCollection::fetchItemById($id)D . MagentoCatalogApiProductRepositoryInterface::getById($id)View AnswerAnswer: B,D

April 10, 2021 No Comments READ MORE +

What will be the result of the customization?

There is a custom extension called MyCompany_MyModule. It has the following layout customization declared in MyCompany/MyModule/view/frontend/layout/default.xml: <referenceContainer name=”content”> <block class=”MagentoFrameworkViewElementTemplate” name=”my.block” template=”MyCompany_MyModule::my_template.phtml” cacheable=”false”/> </referenceContainer> What will be the result of the customization?A . All store front pages will be non-cacheableB . Only the default landing page will be non-cacheableC ....

April 9, 2021 No Comments READ MORE +

How do you do that?

You want to remove a column introduced by a third-party extension via declarative schema. How do you do that?A . Create the etc/db_schema.xml file and specify disable=”true” on the columnB . Modify the original etc/db_schema.xml file and remove the column from thereC . Create a SchemaPatch file and remove the...

April 9, 2021 1 Comment READ MORE +

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

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 nodeB . Run the command bin/magento setup:db-schema:upgrade <table> <constraint declaration>C . This can only be done with raw SQL in a Schema Patch fileD...

April 9, 2021 No Comments READ MORE +

What will be the result of the $product->getFinalPrice() call?

You have loaded an instance of MagentoCatalogModelProduct in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12, $15. What will be the result of the $product->getFinalPrice() call?A . [10, 12, 15]B . 10C . [10,...

April 8, 2021 No Comments READ MORE +