Tested Material Used To Magento-2-Certified-Associate-Developer Test Engine Exam Questions in here [Sep-2021]
Penetration testers simulate Magento-2-Certified-Associate-Developer exam PDF
NEW QUESTION 33
You are debugging a problem resulting from a recently deployed around plugin. The plugin is intercepting the doSomething method. The aroundDoSomething plugin method is called successfully, but the original doSomething method is no longer being executed as expected.
What is causing this?
- A. The plugin implementation is skipping the execution of its callable argument
- B. The plugin implementation returned something other than its callable argument
- C. The sort order of the plugin is too high and supersedes the priority of the intercepted method
- D. The plugin implementation overlooked using the AbstractPlugin parent class
Answer: A
NEW QUESTION 34
In the module located at app/code/MyCompany/MyModulethere 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_USlocate 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
Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js-resources.html
NEW QUESTION 35
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. Event observers are fired in alphabetical order of the observer name. There is no risk here.
- D. There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be
changed.
Answer: C
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/373/magento-observer-events-order-of-operations
NEW QUESTION 36
Assume that a customer's cart only includes one downloadable product.
What effect will it cause on the quote object?
- A. The quote object will not have any address
- B. The quote object will not have a billing address
- C. The quote object will not have shipping address
- D. The quote object will have a downloadable URL instead of an address
Answer: C
NEW QUESTION 37
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 sortOrder="100"
- B. Specify parent="Magento_Backend::marketing_seo"
- C. Specify item XML in the file etc/adminhtml/menu/marketing/seo/menu.xml
- D. Specify parent="Magento_Sitemap::catalog_sitemap"
Answer: A,C
NEW QUESTION 38
You are tasked to install an extension to the merchant's Magento instance.
The extension is developed by the company called MyCompany and its codebase is available from all four locations listed below.
Which two installations options do you choose from to prevent version conflicts during upgrade? (Choose two.)
- A. Download the extension code from the developer's website, and put it into app/code
- B. Use Magento web setup wizard to pull the code from Magento's composer repository
- C. Use composer CLI to pull the code from MyCompany's repository
- D. Clone the code from GitHub and put it into the vendor directory
Answer: A,C
NEW QUESTION 39
During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in
the file etc/adminhtml/system.xml:
What is the consequence of the attribute showInStore being set to 0?
- A. The input field will be disabled if a store view scope is selected in the system configuration
- B. The input field will only be visible if a website's default store scope is selected in the system configuration
- C. The input field will not be visible if a store view scope is selected in the system configuration
- D. The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a
$scopeType argument of 'store'.
Answer: C
Explanation:
Explanation/Reference: https://www.mageplaza.com/magento-2-module-development/create-system-xml-configuration-
magento-2.html
NEW QUESTION 40
You are adding a child node to the product.info block using the XML:
How will this block be rendered?
- A. Automatically if the block class Custom implements the _toHtml method
- B. Child block nodes are automatically rendered as HTML
- C. The layout is invalid since block elements cannot be nested
- D. By calling $block->getChildHtml('mynewblock') in the parent block's template
Answer: D
NEW QUESTION 41
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 42
Which two ways does Magento persist category relationships in the database? (Choose two.)
- A. Using slash-separated values in the path field
- B. Using comma-separated values in the parent-ids field
- C. in the table catalog_category_index
- D. in the parent_id field
Answer: C,D
NEW QUESTION 43
You are developing a new theme which inherits from the Magento_Luma theme.
How is this accomplished?
- A. Add Magento/luma to etc/view.xml
- B. Add Magento/luma to theme.xml
- C. Run the CLI command bin/magento dev:theme:inherit Magento_Luma
- D. Specify the parent theme in Magento admin > Design > Configuration
Answer: B
Explanation:
Explanation/Reference: https://www.mageants.com/blog/how-to-create-custom-theme-in-magento-2.html
NEW QUESTION 44
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. Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml
- C. Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml
- D. Make sure bin/magento cron:run is added to the system crontab
Answer: C,D
NEW QUESTION 45
A module you are developing requires the addition of new routes that should be accessible in the store front.
Where do you define your module's frontName?
- A. etc/config.xml
- B. etc/frontend/config.xml
- C. etc/routes.xml
- D. etc/frontend/routes.xml
Answer: D
Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html
NEW QUESTION 46
You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.
What is the correct layout declaration for this?
- A. Option A
- B. Option D
- C. Option B
- D. Option C
Answer: B
NEW QUESTION 47
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. The move instruction allows altering an element's parent node
- B. They are the same, both provide access to the same functionality
- C. Elements are renamed by default when using the move instruction
- D. Before and after attributes can only be used with referenceContainer and referenceBlock
Answer: D
NEW QUESTION 48
Assume that a customer's cart only includes one downloadable product.
What effect will it cause on the quote object?
- A. The quote object will not have any address
- B. The quote object will not have a billing address
- C. The quote object will not have shipping address
- D. The quote object will have a downloadable URL instead of an address
Answer: C
Explanation:
Explanation
NEW QUESTION 49
You are implementing a custom module MyModule, which provides an implementation of \Psr\Log\LoggerInterface called \MyCompany\MyModule\Logger.
The LoggerInterface has the default preference declared in app/etc/di.xml.
Keeping upgradability in mind, how do you make \MyCompany\MyModule\Logger the default implementation of the LoggerInterface globally?
- A. Overwrite the existing preference for the LoggerInterface in app/etc/di.xml
- B. Declare a new preference for the LoggerInterface in MyCompany/MyModule/etc/di.xml
- C. Declare a new preference for the LoggerInterface in
app/code/myCompany/MyModule/etc/frontend/di.xml - D. Declare a new preference for the LoggerInterface in
app/code/MyCompany/MyModule/etc/global/di.xml
Answer: A
NEW QUESTION 50
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 51
......
Authentic Best resources for Magento-2-Certified-Associate-Developer Online Practice Exam: https://www.pass4sures.top/Magento-Certified-Developer/Magento-2-Certified-Associate-Developer-testking-braindumps.html