[Nov-2021] Free AD0-E703 Exam Questions AD0-E703 Actual Free Exam Questions
Verified AD0-E703 dumps and 137 unique questions
NEW QUESTION 16
You have loaded an instance of Magento\Catalog\Model\Product 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. 0
- B. [10, 12, 12, 15]
- C. [10, 12, 15]
- D. 1
Answer: A
NEW QUESTION 17
You need to add a new column to the sales_shipment and the sales_shipment_grid tables. Other than utilizing the default addColumn methods, what way is automatic?
- A. Ensure your UpgradeSchema class extends CoreSetup and call $this->addSalesColumns().
- B. Utilize the SalesSetup class' addAttribute method.
- C. On the ModuleDataSetupInterface, call $setup->getSales()->addColumn().
- D. On the default EavSetup class, utilize the addColumn method.
Answer: B
NEW QUESTION 18
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.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
- B. Run a command: bin/magento setup:db-schema:upgrade <table> <column definition>
- C. Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade
- D. Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade
Answer: D
NEW QUESTION 19
What happens when a category's is_anchor attribute is set to 1?
- A. The customer will see all products from all children of the category
- B. Products without a specified category will be associated with this category
- C. This is the default category for a website
- D. The category will always be visible in the menu
Answer: A
NEW QUESTION 20
How do you obtain customer information in a JavaScript module?
- A. By sending an AJAX request to the url: /customer/account/info/?json=1
- B. Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem('customer')
- C. By using customerData.get('customer') call, where customerData is an instance of Magento_Customer/js/customer-data
- D. Magento does not expose customer information in JavaScript for security reasons
Answer: C
NEW QUESTION 21
You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml Which two actions are required to ensure the new plugin will execute last? (Choose two.)
- A. Include a sortOrder="20" on the new plugin in MyCompany_Magic's etc/di.xml file
- B. Set a sortOrder="10" for MyCompany_Admission's plugin in MyCompany_Magic's etc/di.xml
- C. Add MyCompany_Admission as a dependency in MyCompany_Magic's etc/module.xml file
- D. Configure plugin sequencing for both plugins in MyCompany_Magic's etc/plugin_sequence.xml file
Answer: A,B
NEW QUESTION 22
You have been given the task of importing products from an external source. You decide to create a custom module to do this. The class handling the import creates a product for each record, sets the data on it and saves it to the database.
What do you inject into a constructor to represent each product you create?
- A. \Magento\Catalog\Model\ProductBuilder
- B. \Magento\Catalog\Api\Data\ProductInterfaceFactory
- C. \Magento\Catalog\Api\Data\ProductInterface
- D. \Magento\Catalog\Model\Product
Answer: B
NEW QUESTION 23
Assume that $collection is a new instance of a class that extends
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, 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 A
- B. Option B
- C. Option D
- D. Option C
Answer: A
NEW QUESTION 24
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. If a preference for the core block is set, the template will no longer apply
- C. This setup will throw an IllegalStateException
- D. If another module is installed which also customizes the same core template, the templates will be rendered sequentially
Answer: A
NEW QUESTION 25
You are adding a new menu item to the admin backend which will link to a custom backend page.
The declaration of the route:
What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?
- A. action="adminhtml/mycompany/mymodule/"
- B. It is not possible without extending the adminhtml route in routes.xml
- C. action="mycompany/mymodule/"
- D. action="admin/mycompany/mymodule/"
Answer: C
NEW QUESTION 26
Your module adds a new controller class which will return a JSON response.
What will be the return type of the execute method?
- A. The string value of \Zend_Json::encode()
- B. No return needed, an object that can be converted to JSON must be set as the Response body
- C. You should implement a new API endpoint instead of returning JSON from a controller
- D. An instance of \Magento\Framework\Controller\Result\Json
Answer: D
NEW QUESTION 27
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?
- A. Option B
- B. Option D
- C. Option C
- D. Option A
Answer: A
NEW QUESTION 28
In layout files you can change al element's order on a page. This can be done using one of the following:
* <move> instruction
* before and after element attributes?
How are two methods different?
- A. Elements are renamed by default when using the move instruction
- B. Before and after attributes can only be used with referenceContainer and referenceBlock
- C. They are the same, both provide access to the same functionality
- D. The move instruction allows altering an element's parent node
Answer: D
NEW QUESTION 29
While reviewing a layout file named sales_order_view.xml you notice the element
<update handle="customer_account"/>
What is the purpose of this element?
- A. Updates the current page handle to customer_account
- B. Replaces the customer_account handle with sales_order_view
- C. Adds the customer_account handle to the page's handles list
- D. Nothing, this element has been deprecated
Answer: C
Explanation:
Explanation
https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/layouts/xml-instructions.html#fedg_layout_xml-in
NEW QUESTION 30
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="Magento\Framework\View\Element\Template"
name="my.block"
template="MyCompany_MyModule::my_template.phtml"
cacheable="false"/>
</referenceContainer>
What will be the result of the customization?
- A. my.block on the default landing page only will be cached using ESI.
- B. All store front pages will be non-cacheable
- C. Only the default landing page will be non-cacheable
- D. my.block on the all store front pages will be cached using ESI
Answer: B
NEW QUESTION 31
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. Ensure that the primary key in the corresponding table is named vendor_id
- B. Create an entry in etc/di.xml and add the argument eventPrefix with the value of vendor
- C. Declare the $_eventPrefix property in your vendor model and set it to vendor
- D. You must implement all appropriate methods and fire the events manually
Answer: C
NEW QUESTION 32
You are creating a new page layout for your custom module.
What is the primary difference between container and block elements?
- A. A block's position within the layout can be altered
- B. They extend different abstract classes
- C. Only containers can be removed by name or alias
- D. A container's children are rendered automatically
Answer: D
NEW QUESTION 33
You have created a module with a custom ACL resource and want to restrict access to resources of your module.
Which three items are restricted based on ACL role permissions? (Choose three.)
- A. Storefront login
- B. Adminhtml controllers
- C. CLI Commands
- D. Webapi resources
- E. System configuration sections
Answer: B,D,E
NEW QUESTION 34
......
Latest 100% Passing Guarantee - Brilliant AD0-E703 Exam Questions PDF: https://pass4sure.updatedumps.com/Adobe/AD0-E703-updated-exam-dumps.html