ASSOCIATE DEVELOPER EXAM TEST POOL-01 (MAGENTO 2 CERTIFIED)

Miska Red
Quiz by Miska Red, updated more than 1 year ago
Miska Red
Created by Miska Red over 2 years ago
7991
8

Description

This only my study notes, questions will NOT be found on the final exam. They might be similar. 60 questions 90mi 68% to pass Based on Magento Open Source (2.3) and Magento Commerce (2.3),

Resource summary

Question 1

Question
You are building a new module to add extra functionality to the Magento application. What files are required? (Select 3 only)
Answer
  • registration.php
  • etc/module.xml
  • composer.json
  • Setup/InstallSchema.php
  • etc/config.xml
  • etc/di.xml

Question 2

Question
You need to add the Google Tag Manager (GTM) to every page. What three steps do you take to accomplish this in MyCompany_MyModule? (Select 3 only)
Answer
  • Add into view/frontend/layout/default.xml.
  • Create view/frontend/layout/default.xml.
  • Create view/frontend/templates/script.phtml and add GTM code.
  • Run bin/magento create:module:template script.phtml
  • Copy vendor/module-catalog/view/template/script.phtml to view/template/script.phtml and add GTM script.

Question 3

Question
You are reviewing a module to some special functionality to the Magento 2 application, You see directory /Console, What task you think in this directory contain script for this modules?
Answer
  • contains CLI commands
  • contains any PHP classes exposed to the API
  • contains cron job definitions.
  • contains section files
  • open directory /Console & check script what code contaib

Question 4

Question
You are reviewing a module to some special functionality to the Magento 2 application, You see directory /API, What task you think in this directory contain script for this modules?
Answer
  • Contains the module’s interfaces for models , classes and any PHP classes exposed
  • Contains PHP files utilized for information processing
  • Used for storing the PHP files that are responsible for console programs execution
  • Contains controller files that process requests sent to the server.
  • Store the files, which are later executed on the Cron launching.
  • Contains PHP files responsible for processing information for sections
  • Contains the main configuration files of the module

Question 5

Question
You are building an extension that will be sold on the Magento Marketplace. This extension depends on Magento_Catalog. How is a Magento database upgrade performed?
Answer
  • Manually on the CLI
  • Automatically when a new module version is detected
  • Manually in the Admin UI
  • When the cache is cleared and the module change is present

Question 6

Question
You’re tasked with investigating a custom page layout declared in MyCompany/MyModule that isn’t loading. You’ve determined that this is the result of your XML configuration. Which 2 files do you investigate to locate the issue?(Select 2 only)
Answer
  • MyCompany/MyModule/view/frontend/page_layout/custom.xml
  • MyCompany/MyModule/view/frontend/layouts.xml
  • MyCompany/MyModule/view/frontend/layout/page.xml
  • MyCompany/MyModule/view/page_layout/custom.xml

Question 7

Question
A merchant would like to manually specify the order of products per category. How is this done?
Answer
  • There is a position field on the category management page which allows you to define the order of a product in the category.
  • This requires a customization.
  • There is a position field on the product management page which defines a position of the product in all categories.
  • Custom ordering is disabled by default, but can be enabled in System Configuration.

Question 8

Question
What happens when a customer adds two of the same simple products with different custom options to the cart?
Answer
  • They will be shown as two separate line items.
  • Magento will replace the first variation with the second one.
  • An exception will be thrown because multiple variations of custom options for a simple product cannot be added to the cart.
  • They will be shown as one line item which lists both variations alongside their quantities.

Question 9

Question
You are working on a new theme development base on Magento/luma theme . You create dir app/design/frontend/MyCompany/m2-mytheme/theme.xml . What is your <parent> ---- </parent> in theme.xml ?
Answer
  • Magento/luma
  • Magento/blank
  • Magento/RWD
  • Magento/default

Question 10

Question
You are working on a new theme development base on Magento/luma theme . You create dir app/design/frontend/MyCompany/m2-mytheme/registration.php . Register component in: \Magento\Framework\Component\ComponentRegistrar::register( ---); What code Register your component ?
Answer
  • \Magento\Framework\Component\ComponentRegistrar::THEME,'frontend/MyCompany/m2-mytheme', __DIR__
  • \Magento\Framework\Component\ComponentRegistrar::THEME,' m2-mytheme', __DIR__
  • \Magento\Framework\Component\ComponentRegistrar::THEME,'MyCompany/m2-mytheme', __DIR__
  • \Magento\Framework\Component\ComponentRegistrar::Component,'m2-mytheme', __DIR__

Question 11

Question
You are working on a new Module development . You create dir app/code/MyCompany/Mymodule/registration.php . Register component in:\Magento\Framework\Component\ComponentRegistrar::register(, ---------- 'MyCompany_Mymodule',__DIR__); What code Register your component ?
Answer
  • \Magento\Framework\Component\ComponentRegistrar::MODULE,'MyCompany_Mymodule',
  • \Magento\Framework\Component\ComponentRegistrar::MODULE,'frontend/MyCompany_Mymodule',
  • \Magento\Framework\Component\ComponentRegistrar::THEME,'frontend/MyCompany_Mymodule',
  • \Magento\Framework\Component\ComponentRegistrar::Component,'frontend/MyCompany_Mymodule',

Question 12

Question
You are working on a new Language Packages. You create dir app/i18n/magento/de_de/registration.php . Register component in:\Magento\Framework\Component\ComponentRegistrar::register( ?????, __DIR__); What code Register your component ?
Answer
  • \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,'magento_de_de'
  • \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,'frontend/magento_de_de'
  • \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,'i18n/magento_de_de'
  • \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,'i18n/magento/de_de'

Question 13

Question
What Register your component (Module,Theme, Language)?
Answer
  • \Magento\Framework\Component\ComponentRegistrar::register()
  • \Magento\Framework\API\ComponentRegistrar::register()
  • \Magento\Framework\Module\ComponentRegistrar::register()
  • \Magento\Framework\Theme\ComponentRegistrar::register()

Question 14

Question
What is the functional difference of Block & Container in Magento 2? (Choose 4 only))
Answer
  • Blocks along with containers are basic components of the Magento page structure.
  • Containers are what page framework is built from
  • page structure. Header, footer, left sidebar, main column are the main containers
  • Site navigation, product list, category list, footer links are some of the most frequently used page blocks.
  • Using Block you can define page layout without any template, you just need to write your XML layout

Question 15

Question
Every container has its own attributes, that let you manage it. Let’s select below each of them?(Choose 3 only))
Answer
  • Name,Label,Output
  • Before/after,As,
  • Html Tag,HtmlId,HtmlClass
  • Cacheable,Template,Class

Question 16

Question
by default blocks are injected with a --------------------------object and support getters and setters for returning and storage any objects or data.
Answer
  • \Magento\Framework\View\ Element\Template\Context
  • \Magento\Framework\View\Element\Template
  • \Magento\Framework\View\TemplateEnginePool
  • \Magento\Framework\View\Page\Config

Question 17

Question
All block extends ------------?
Answer
  • \Magento\Framework\View\Element\Template
  • \Magento\Framework\View\ Element\Template\Context
  • \Magento\Store\Model\StoreManagerInterface
  • \Magento\Framework\View\Page\Config

Question 18

Question
You are working on magento 2 store, Your Lead developer instruct you to reove uns used /module-braintree core vendor module, How can your remove this module from composer.json ?
Answer
  • "replace": { "magento/module-braintree": "*", },
  • "extra": { "magento/module-braintree": "*", }
  • "require": {"magento/module-braintree": "*", },
  • "require-dev": {"magento/module-braintree": "*", },
  • "autoload": {"magento/module-braintree": "*", },
  • "autoload-dev": {"magento/module-braintree": "*", },

Question 19

Question
You are working on magento 2.3 store,You using MSP ReCaptcha that reCaptcha missing on Product Review & Newsletter Subscriber so that you create issues about this , after few day developer Requested feature were implemented but magento new relase not published,First you run command# composer update nothing updated MSP_ReCaptcha, Secondly you pull update code on your app/code/ directory & #php bin/magento setup:upgrade command showing error module Autoload error: Module 'MSP_ReCaptcha' from '../app/code/MSP/ReCaptcha' has been already defined in '../vendor/msp/recaptcha. Keeping upgradeability and maintainability in mind, How can use updateed this module ?
Answer
  • Add this line "replace": { "msp/recaptcha":"*", }, in composer.json & follow Second Methods
  • Delete /vendor/msp/recaptcha & follow Second Methods
  • Download new repository manually & upload to /vendor/msp/recaptcha & follow Second Methods
  • Delete /vendor/msp/recaptcha & follow First Methods

Question 20

Question
You are working on magento 2 Module, you add app/code/YourCompany/StartingWithLess/view/frontend/web/red-alert.less, How to add style in<head> ------------ </head> of /view/frontend/layout/default.xml file?
Answer
  • <css src="YourCompany_StartingWithLess::red-alert.css"/>
  • <css src="YourCompany_StartingWithLess::red-alert.less"/>
  • <css src="YourCompany_StartingWithLess::red-alert.sass"/>
  • <css src="YourCompany_StartingWithLess::red-alert.style"/>

Question 21

Question
You are reviewing a module to some special functionality to the Magento 2 application, You see directory /Services, What task you think in this directory contain script for this modules?
Answer
  • Open the file in this directory & check purpose
  • Contains cron job definitions.
  • Contains Service Contact
  • contains section files

Question 22

Question
Which default Magento 2 has the following cache types Database operations? (Select 3)
Answer
  • collections
  • db_ddl
  • reflection
  • block_html

Question 23

Question
If you want to get information about all declared cache types. It returns an array of data objects, where each one contains the following data? (Select 5)
Answer
  • id
  • cache_type
  • description
  • tags
  • status
  • cache_name

Question 24

Question
import product programmatically foreach ($items as $item) { $product = $objectManager->create('\Magento\Catalog\Model\Product'); $product->setSku($item['sku']); $product->save(); } Where save each item first?
Answer
  • database
  • cache
  • script
  • radis

Question 25

Question
What Directory are found in \Magento\Framework\Controller\ ..... Controller Directory Reference ? (Select 4)
Answer
  • Index
  • Noroute
  • Result
  • Router
  • Redirect
  • Response

Question 26

Question
Which File are found on \Magento\Framework\Controller\Result\ ..... Result Directory Reference? (Select 6)
Answer
  • RedirectFactory.php
  • Redirect.php
  • Forward.php
  • Json.php
  • JsonFactory.php
  • Raw.php
  • ForwardAction.php
  • RedirectResponse.php

Question 27

Question
Which php File are found on \Magento\Framework\Controller\...... Controller Directory Reference?
Answer
  • AbstractResult.php
  • ResultInterface.php
  • ResultFactory.php
  • RouterFactory.php
  • RouterInterface.php

Question 28

Question
You are investigating a problem on the staging server environment. Here is the error: The source file was not found. Stack trace: #0 vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile() Where is Magento\Framework\View\Asset\File found?
Answer
  • vendor/magento/framework/View/Asset/File.php
  • vendor/magento/module-framework/View/Asset.php
  • app/code/Magento/Framework/View/Asset/File.php
  • lib/internal/Magento/Framework/View/Asset/File.php

Question 29

Question
You have just completed building a new module and have tested that it works. You are now are ready to commit the code for review. This module uses extension attributes and stores data about orders, but in a separate table. What action must you take to ensure that this module will behave properly in production?
Answer
  • Create a schema whitelist for the module.
  • Add the module’s name to app/etc/config.php.
  • Double-check that the install process properly executes.
  • Ensure composer.json contains the correct version.

Question 30

Question
You are customizing a very basic Magento installation that is using the Luma theme. You are requested to alter the code in the Magento_Catalog::product/list.phtml template. Keeping upgradeability in mind, how do you do this?
Answer
  • Create a new theme and copy the template into the appropriate directory inside the new theme.
  • In a custom module, create a layout XML file that changes the template attribute to a new template.
  • Add layout XML to the Content > Design > Theme page.
  • Override the Magento\Catalog\Block\Product\List block to specify a new template file.
Show full summary Hide full summary

Similar

PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Miska Red
SOLUTION SPECIALIST TEST-01 (MAGENTO 2 CERTIFIED )
Miska Red
Cloud Developer Exam Test-01(MAGENTO 2 CERTIFIED Professional )
Miska Red
Magento 2 Cloud
Oleksiy P
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Станислав Матявин
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Dario Dorfelli
MAGENTO 2 CERTIFIED SOLUTION SPECIALIST PRACTICE TEST
Pankaj Sharma
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
test test
SOLUTION SPECIALIST TEST-01 (MAGENTO 2 CERTIFIED )
Khrystyna Balog
Magento 2 Certified Professional Front End Developer Exam Questions
Benoit Alix
La estadistica, mapa conceptual
Tirso Solano