Questão 1
Questão
You are building a new module to add extra functionality to the Magento application. What files are required? (Select 3 only)
Responda
-
registration.php
-
etc/module.xml
-
composer.json
-
Setup/InstallSchema.php
-
etc/config.xml
-
etc/di.xml
Questão 2
Questão
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)
Responda
-
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.
Questão 3
Questão
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?
Responda
-
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
Questão 4
Questão
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?
Responda
-
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
Questão 5
Questão
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?
Questão 6
Questão
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)
Responda
-
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
Questão 7
Questão
A merchant would like to manually specify the order of products per category. How is this done?
Responda
-
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.
Questão 8
Questão
What happens when a customer adds two of the same simple products with different custom options to the cart?
Responda
-
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.
Questão 9
Questão
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 ?
Responda
-
Magento/luma
-
Magento/blank
-
Magento/RWD
-
Magento/default
Questão 10
Questão
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 ?
Responda
-
\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__
Questão 11
Questão
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 ?
Responda
-
\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',
Questão 12
Questão
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 ?
Responda
-
\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'
Questão 13
Questão
What Register your component (Module,Theme, Language)?
Responda
-
\Magento\Framework\Component\ComponentRegistrar::register()
-
\Magento\Framework\API\ComponentRegistrar::register()
-
\Magento\Framework\Module\ComponentRegistrar::register()
-
\Magento\Framework\Theme\ComponentRegistrar::register()
Questão 14
Questão
What is the functional difference of Block & Container in Magento 2? (Choose 4 only))
Responda
-
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
Questão 15
Questão
Every container has its own attributes, that let you manage it. Let’s select below each of them?(Choose 3 only))
Questão 16
Questão
by default blocks are injected with a --------------------------object and support getters and setters for returning and storage any objects or data.
Responda
-
\Magento\Framework\View\ Element\Template\Context
-
\Magento\Framework\View\Element\Template
-
\Magento\Framework\View\TemplateEnginePool
-
\Magento\Framework\View\Page\Config
Questão 17
Questão
All block extends ------------?
Responda
-
\Magento\Framework\View\Element\Template
-
\Magento\Framework\View\ Element\Template\Context
-
\Magento\Store\Model\StoreManagerInterface
-
\Magento\Framework\View\Page\Config
Questão 18
Questão
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 ?
Responda
-
"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": "*", },
Questão 19
Questão
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 ?
Responda
-
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
Questão 20
Questão
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?
Responda
-
<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"/>
Questão 21
Questão
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?
Questão 22
Questão
Which default Magento 2 has the following cache types Database operations? (Select 3)
Responda
-
collections
-
db_ddl
-
reflection
-
block_html
Questão 23
Questão
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)
Responda
-
id
-
cache_type
-
description
-
tags
-
status
-
cache_name
Questão 24
Questão
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?
Responda
-
database
-
cache
-
script
-
radis
Questão 25
Questão
What Directory are found in \Magento\Framework\Controller\ .....
Controller Directory Reference ? (Select 4)
Responda
-
Index
-
Noroute
-
Result
-
Router
-
Redirect
-
Response
Questão 26
Questão
Which File are found on \Magento\Framework\Controller\Result\ .....
Result Directory Reference? (Select 6)
Responda
-
RedirectFactory.php
-
Redirect.php
-
Forward.php
-
Json.php
-
JsonFactory.php
-
Raw.php
-
ForwardAction.php
-
RedirectResponse.php
Questão 27
Questão
Which php File are found on \Magento\Framework\Controller\......
Controller Directory Reference?
Responda
-
AbstractResult.php
-
ResultInterface.php
-
ResultFactory.php
-
RouterFactory.php
-
RouterInterface.php
Questão 28
Questão
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?
Responda
-
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
Questão 29
Questão
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?
Responda
-
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.
Questão 30
Questão
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?
Responda
-
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.