DumpExams is an authorized company offering valid and latest dump exams & dumps VCE materials. Our dump exams & dumps VCE materials are high-quality; our passing rate is higher than others.

[2021] Magento-2-Associate-Developer PDF Questions - Perfect Prospect To Go With Dumpexams Practice Exam [Q18-Q36]

Share

[2021] Magento-2-Associate-Developer PDF Questions - Perfect Prospect To Go With Dumpexams Practice Exam

Magento Magento-2-Associate-Developer Pdf Questions - Outstanding Practice To your Exam

NEW QUESTION 18
How do you obtain customer information in a JavaScript module?

  • A. Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem
    ('customer')
  • B. By using customerData.get('customer') call, where customerData is an instance of Magento_Customer/js/
    customer-data
  • C. Magento does not expose customer information in JavaScript for security reasons
  • D. By sending an AJAX request to the url: /customer/account/info/?json=1

Answer: B

Explanation:
Explanation/Reference: https://belvg.com/blog/customer-data-management-in-magento-2.html

 

NEW QUESTION 19
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
How is this one?

  • A. An event observer adds RewriteRules to .htaccess on product save
  • B. Using a URL Rewrite stored in the database connecting the request path with the target path
  • C. Magento\Catalog\Controller\Product\View::loadByUrlKey loads product pages using the url_key attribute value
  • D. A plugin on \Magento\UrlRewrite\Controller\Router::match loads products by the url_key attribute

Answer: B

 

NEW QUESTION 20
A module declares the route:

What is the layout handle of the storefront path /custom/feature/?

  • A. custom_feature
  • B. custom_feature_index
  • C. mymodule_feature_index
  • D. mymodule_feature

Answer: A

 

NEW QUESTION 21
How do you pass an array ['one', 'two] as a parameter to you block using the layout XML arguments directive?

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

Answer: A

Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html

 

NEW QUESTION 22
What is the difference between online and offline shipping methods?

  • A. Online means that it will be sent to the customer using a shipping carrier, offline means the customer will pick up the order in person
  • B. Online means Magento will use a shipping carrier's API to obtain rates, offline means Magento will calculate the rates internally
  • C. Online means that a shipment will have a tracking number, and offline means no tracking numbers are available
  • D. Online means that an item's shipping will be processed by the merchant, offline means that it will be processed by the customer

Answer: D

 

NEW QUESTION 23
\Magento\Sales\Model\Api\OrderRepositoryInterface::getList accepts a SearchCriteriaInterface to filter and sort information.
What class assists in creating an instance for SearchCriteriaInterface?

  • A. \Magento\Sales\Model\Order\SearchCriteria
  • B. \Magento\Framework\Api\SearchCriteriaBuilder
  • C. \Magento\Backend\Api\SearchCriteriaGenerator
  • D. \Magento\Framework\Api\SearchCriteriaFactory

Answer: B

Explanation:
Explanation/Reference: https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Api/ SearchCriteriaInterface.php

 

NEW QUESTION 24
How can you render a text on a page using only layout xml?

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

Answer: B

 

NEW QUESTION 25
You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer
specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
How is this represented in Magento?

  • A. Using custom options, with rings as simple products
  • B. Using categories, with each ring size as a separate product
  • C. Using configurable products, with ring size as an attributive value
  • D. Using custom options, with rings as bundle products

Answer: C

 

NEW QUESTION 26
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.
What is the public URL for this file?

  • A. https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js
  • B. https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
  • C. https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
  • D. https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js

Answer: D

 

NEW QUESTION 27
Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class responsible for the frontend path /mymodule/custom.
What file contains the controller class for the frontend path /mymodule/custom?

  • A. Controller/MyModule/Custom/Index.php
  • B. Controller/Custom.php
  • C. Controller/Custom/Index.php
  • D. Controller/Frontend/MyModule/Custom.php

Answer: C

Explanation:
Explanation/Reference: https://www.simicart.com/blog/magento-create-controller/

 

NEW QUESTION 28
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 two separate line items with quantity 1 each
  • C. As one line item which lists both configurable products with quantity 1 each
  • D. As one line item of the first product with quantity 2

Answer: B

 

NEW QUESTION 29
You are adding a new entry to the backend menu that appears after
Marketing > SEO & Search > Site Map
You see the existing site map menu item is declared by the node:

What two actions do you take to configure the new menu entry location? (Choose two.)

  • A. Specify parent="Magento_Backend::marketing_seo"
  • B. Specify sortOrder="100"
  • C. Specify item XML in the file etc/adminhtml/menu/marketing/seo/menu.xml
  • D. Specify parent="Magento_Sitemap::catalog_sitemap"

Answer: A,B

 

NEW QUESTION 30
You have configured an event observer to watch the checkout_submit_all_after event using this XML:

What is the required class definition for the event observer?

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

Answer: B

 

NEW QUESTION 31
A client has asked you to include category url keys in product URLs.
How is this done?

  • A. Set the configuration value of catalog/seo/product_use_categories to Yes
  • B. This is not possible because products can belong to multiple categories
  • C. Create an observer for controller_action_postdispatch_catalog_product_view
  • D. Create an after plugin on \Magento\UrlRewrite\Controller\Router::generateRewrite

Answer: A

 

NEW QUESTION 32
You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.
In which file will the event observer be declared?

  • A. etc/config.xml
  • B. etc/frontend/events.xml
  • C. etc/events.xml
  • D. etc/frontend.xml

Answer: B

Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/128548/trigger-event-after-an-order-has-been- created-saved/128565

 

NEW QUESTION 33
A module declares the route:

What is the layout handle of the storefront path /custom/feature/?

  • A. mymodule_feature_index
  • B. custom_feature_index
  • C. mymodule_feature
  • D. custom_feature

Answer: A

 

NEW QUESTION 34
You are adding an entry to the backend menu. To do so you open a core etc/adminhtml/menu.xml file as a reference. In the file you see the node:

What is the result of specifying resource="Magento_Catalog::catalog"?

  • A. The menu item will only be visible if the class method specified by the resource returns a true value
  • B. The menu item will only be visible to users who are assigned to a role with access to the matching ACL resource
  • C. The resource is used to locate the correct translation for the attributes listed in title="..."
  • D. The last selected menu item for a user is stored in the DB so the previously visited page can be restored on the next login

Answer: B

Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/204879/consumer-is-not-authorized-to-access- resources-magento-2

 

NEW QUESTION 35
You need to find all orders in the processing state. You have written the code:

How do you resolve the exception?

  • A. Clear generated code to get a new version of SearchCriteriaBuilder
  • B. Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface
  • C. Use dependency injection to load an instance of the SearchCriteria class
  • D. Change the getList parameter to: $searchCriteraBuilder->addFilter('state','processing')->create()

Answer: D

 

NEW QUESTION 36
......

Online Questions - Outstanding Practice To your Magento-2-Associate-Developer Exam: https://www.dumpexams.com/Magento-2-Associate-Developer-real-answers.html