[Sep 21, 2022] Valid AD0-E704 Test Answers & Adobe AD0-E704 Exam PDF
Realistic AD0-E704 Exam Dumps with Accurate & Updated Questions
NEW QUESTION 48
Consider below command: bin/magento dev:theme:create frontend vendor themename Please select correct options based on it (choose 2):
- A. dev is group and
frontend is a subject area argument - B. theme is group and
create is an action - C. dev is subject and
frontend is a subject area argument - D. theme is subject and
create is an action
Answer: A,D
NEW QUESTION 49
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 \Magento\Cms\Api\BlockRepositoryInterface. $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 D
- D. Option C
Answer: C
NEW QUESTION 50
You are reviewing a codebase and come across the following in a layout XML file:
The project is using Varnish for full page caching. How will Magento use the 111 attribute value?
- A. To set the timeout for the block output in the browser local storage
- B. To set the cache lifetime when saving the block output to the block cache
- C. To set the Expires HTTP header when serving the block as an ESI
- D. To set the Expires HTTP response headers for any page containing this block
Answer: B
NEW QUESTION 51
You are working on a project with custom code located in an observer MyCompany\MyModule\Observer\Custom on the catalog_product_load_before event. How do you prevent your custom observer from being executed on a staging preview?
- A. By moving your observer to the staged_catalog_product_load_before event
- B. No action is required, the catalog_product_ioad_before event is excluded from the execution on staging preview
- C. By specifying an attribute excude_from_staging_previwe*=''i'' in the declaration of the observer in the events.xml file
- D. By adding your observer to the bannedobserver parameter of Magento\staging\Model\Event\Manager using di. xml
Answer: C
NEW QUESTION 52
Magento regenerates the admin URL secret key for each new session. What is the purpose of this key?
- A. To validate ACL permissions for the current admin user
- B. To prevent admin pages from being cached
- C. To prevent brute-force attacks
- D. To prevent admin panel Cross Site Request Forgery attacks
Answer: A
NEW QUESTION 53
You are programmatically creating a customer EAV attribute and want to add it to the customer segment's condition options. How do you do this?
A)
B)
C)
D)
- A. Option A
- B. Option B
- C. Option D
- D. Option C
Answer: B
NEW QUESTION 54
A sample routes.xml looks like
What is the effect of the before attribute?
- A. Actions in Magento_Checkout Will match before actions in MyCompany_MyModule
- B. Actions in MyCompany_MyModule Will match before actions in \lagento_Checkout
- C. MyCompany.MyModule will be loaded before Magento.Checkout
- D. Magento.Checkout Will be loaded before MyCompanv_MyModule
Answer: B
NEW QUESTION 55
You have created a new gateway payment method. You configured the command pool in a di. xml file and added the MyCompany\MyModule\Gateway\Command\Sale command with the name sale to it. Your Sale command extends the Magento\Payment\Gateway\Command\GatewayCommand class.
You have also created a payment_action option in the system configuration and set the value to authorize_capture.
You found the sale command is never called when placing an order.
Which action will fix the problem?
- A. The command name has to be changed to capture
- B. The payment action has to be changed to sale
- C. The sale command has to be registered in the etc config. xml as sales_model for a payment method
- D. The SaleCommand Class has to extend the \Magento\Payment\Gateway\Command\SaleCommand Class
Answer: C
NEW QUESTION 56
The merchant asked you to implement an order review step on the checkout after the payment step. Which problem do you need to resolve?
- A. Magento does not allow to add a step after the payment step
- B. There is no WebAPI endpoint for saving payment data without placing an order
- C. There is no WebAPI class for placing an order without saving a payment data
- D. The "Place order" button belongs to a payment method template so you have to customize all payment methods
Answer: A
NEW QUESTION 57
Suppose, you need to create custom configuration file called search.xml, in the a custommodule under etc/. Which steps are needed to achieve this:
- A. Create module_dir/etc/config.xml and modules_dir/etc/config.xsd
- B. Define loader in module_dir/etc/di.xml, for the custom conifguration file module_dir/etc/config.xml
- C. Create module_dir/etc/search.xml and modules_dir/etc/search.xsd
- D. Define loader in module_dir/etc/di.xml, for the custom conifguration file module_dir/etc/search.xml
Answer: C,D
NEW QUESTION 58
For an existing core class, you created 3 plugins PluginA, PluginB and PluginC with sort orders 10, 20 and 30 respectively. but when implementing pluginB you used around method and did not used callable in it.What should be the plugins executaion order as per above scenerio:
- A. PluginA, PluginB
- B. PluginB, PluginC
- C. PluginA, PluginB, PluginC
- D. PluginB, PluginC, PluginA
Answer: A
NEW QUESTION 59
In a phtml, you added script tag and defined couple of js variables as below:Now to protect it from XSS attacks, which two methods allow you to keep the php variable output XSS-safe?Choose 2
- A. $block->escapeJs($myName)
- B. $block->escapeHtmlAttr($myName)
- C. $block->escapeHtmlAttr($myUrl)
- D. $block->escapeUrl($myUrl)
Answer: A,D
NEW QUESTION 60
You created a custom page on the storefront and you have to render the price for a given product instance which is available in the $product variable. How do you render the price in a phtml template?
A)
B)
C)
D)
- A. Option A
- B. Option D
- C. Option C
- D. Option B
Answer: C
NEW QUESTION 61
You are working on a customization that requires a list of shipping rates available to a user. Which call returns the list of shipping rates?
- A. \Magento\Quote\Model\Quote\Address::getAllShippingRates
- B. \Magento\Shipping\Helper\Rates: :getAHRates
- C. \Magento\Checkout\Api\ShippingInformationManagementInterface::getRates
- D. \Magento\Quote\Model\Quote::getShippingRates
Answer: A
NEW QUESTION 62
Consider below example of etc/di.xml: Magento\Filesystem\Adapter\Local Please select correct statement based on shared="false" attribute in the example:
- A. Magento\Filesystem is not shared, so all clients will retrieve same instances of Magento\Filesystem. Also, every instance of Magento\Filesystem will get same instance of $adapter, because it is non-shared too.
- B. None of these.
- C. Magento\Filesystem is not shared, so no clients will retrieve any instances of Magento\Filesystem. Also, no instance of Magento\Filesystem will get any instance of $adapter, because it is non-shared too.
- D. Magento\Filesystem is not shared, so all clients will retrieve separate instances of Magento\Filesystem. Also, every instance of Magento\Filesystem will get separate instance of $adapter, because it is non-shared too.
Answer: D
NEW QUESTION 63
Consider below code in a UiComponent xml file: Magedeal\Employee\Ui\DataProvider\Employee\DataProvider employee_data_source entity_id id What is the application of
- A. The class attribute defines DataProvider class which is the primary source of any data or metadata that the component needs or will use.
- B. This references a PHP class that must implement \Magento\Framework\View\Element\UiComponent\DataProvider\DataProviderInterface. And it can also extend or implement the \Magento\Ui\DataProvider\ModifierPoolDataProvider
- C. This references a PHP class that must implement \Magento\Framework\View\Element\UiComponent\DataProvider\UiComponentInterface. And it can also extend or implement the \Magento\Ui\DataProvider\ModifierPoolDataProvider
- D. The class attribute defines UiComponent class which is the primary source of any data or metadata that the component needs or will use.
Answer: A,B
NEW QUESTION 64
You are troubleshooting an issue where a related product rule is not showing the product expected by a user. You run this command:
bin magento cache:clean target_rule
What impact does this have?
- A. Products to Display calculation will be cleared from the Magento cache
- B. Cached select statements will be cleared from action_select column of the magento_targetrule table
- C. HTML output of target rule blocks will be cleared from the Magento cache
- D. Cached select statements will be cleared from the Magento cache
Answer: B
NEW QUESTION 65
You need to include the customer account menu on a custom storefront page, but only when the method MyCompany\\lyModule\ViewModel\MyView: :hasCustomerMenu() returns true. How do you accomplish this?
- A. Create an after plugin for Magento\Framework\View\UyoutInterface::getOutput() and if hasCustomerMenuO returns true, Call $subject->addHandled customer_account')
- B. In the page action controller, if hasCustomer-Menu() returns true, before returning the page result call
Spage->addHandleC custoner_account') - C. In the page action controller, inject the Layoutinterface and if hasCustonerMenu() returns true, call
$layout->addHandle('custooer_account') - D. In the page's layout XML file, add
<update handle="customer_account" if="MyCompany\MyModule\ViewModel\MyView::hasCustomerMenu" >
Answer: D
NEW QUESTION 66
You want to display customized product list along with it's tier prices. To render this price which class should be used and which data needs to be provided ?
- A. In layout xml, use class= Magento\Catalog\Pricing\Render and
price_render argument= product.price.render.simple - B. In layout xml, use class= Magento\Catalog\Pricing\Render and
price_render argument= product.price.render.tier - C. In layout xml, use class= Magento\Catalog\Pricing\Render and
price_render argument= product.price.render.default - D. None of these
Answer: C
NEW QUESTION 67
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. Add aclResolver="Mycompany\MyModule\Model\PathToAc1Resolver" declaration for the relevant methods in webapi. xbI
- 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. Use the built-in scheduled ACL functionality to configure allow-deny rules in the admin panel
Answer: A
NEW QUESTION 68
You are working on a module MyCompany_MyModule which adds a select attribute with a few options using the \Magento\Eav\Setup\EavSetup: :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 is updated when attribute options differ
- B. A duplicate attribute will be created with a different attribute code
- C. The attribute remains the same but the attribute options will be duplicated
- D. The attribute is deleted and created again
Answer: C
NEW QUESTION 69
You need to build a custom module to add a notice to the Advanced Inventory section on the product form. The notice text can be specified in the system configuration. How do you implement this?
- A. You add a field to product_form. xml as a child of the stock_data fieldset
- B. You inject a custom block into the reference container in the catalog_product_index layout
- C. You add a plugin on the form \Magento\Cataiog\Ui\DataProvider\Product\Form\ProductDataProvider to add a field in the Advanced Inventory section
- D. YOU add a plugin on Magento\CatalogInventory\Ui\DataProvider\Product\Form\Modifier\AdvancedInventory to modify the Section metadata
Answer: A
NEW QUESTION 70
A client running Elasticsearch would like products only matching ALL search terms to show on the frontend of the website. How do you do this?
- A. Configure the Match Behavior setting to All in the Magento Admin panel
- B. Create an esconfig.xml configuration file with a <match> node set to all
- C. Send a one-time POST request to the Elasticsearch /.settings endpoint
- D. This requires custom code
Answer: C
NEW QUESTION 71
......
AD0-E704 Exam Dumps - PDF Questions and Testing Engine: https://examtorrent.actualcollection.com/AD0-E704-exam-questions.html