Frage 1
Frage
You need to Replace a default JS component, To use a custom implementation of an existing Magento JS component: Place the custom component source file in one of the --------- locations:
(Select 2)
Antworten
-
Theme JS files: /web/js or /_/web/js
-
Module view JS files: <module_dir>/view/frontend/web/js
-
Module view JS files: <module_dir>/web/js
-
Theme JS files: /view/frontend/web/js or /_/view/frontend/web/js
Frage 2
Frage
You Create a RequireJS configuration file requirejs-config.js, having specified the following: var config = { "map": { "*": { "<default_component><custom_component>" } } };
What do you meaning <default_component> & <custom_component> ?
Antworten
-
<default_component>: the name of the default component you replace
-
<custom_component>: the name of the custom component
-
<default_component>: the name of the custom component
-
<custom_component>: the name of the default component you replace
Frage 3
Frage
A merchant asks you to add frontend validation to their newsletter form. You notice the form has the following attributes:
<form class="form newsletter” novalidate id="newsletter-validate-detail"> Which of the following choices will add frontend validation?
Antworten
-
Add a validation object using data-mage-init attribute.
-
Add form_key input inside of form.
-
Remove the novalidate attribute from form.
-
Add the class mage-validate to form.
Frage 4
Frage
You need to add a custom block of HTML to the header of every page using a layout file in MyCompany/mytheme. Keeping upgradability in mind, how do you add the block?
Antworten
-
Put your customization in MyCompany/mytheme/Magento_Theme/layout/default.xml
-
Keep track of your changes and apply them to Magento/Theme/layout/default.xml after upgrade
-
Put your customization in MyCompany/mytheme/layout/extend.xml
-
Include <extend file="Magento_Theme::default.xml"> in your MyCompany/mytheme/Magento_Theme/layout/default.xml
Frage 5
Frage
Without customization, what types are filtered through the magento2 directives parser? (2)
Antworten
-
CMS blocks
-
CMS Pages
-
Module
-
Theme
Frage 6
Frage
You are creating a new Magento theme for a merchant. This theme will be included in the project's git repository.Keeping upgradeability in mind, where do you place the files and directories that pertain to this theme?
Antworten
-
app/design/frontend/MyCompany/MyTheme/
-
vendor/mycompany/my-theme/
-
app/design/MyCompany/MyTheme/frontend/
-
lib/themes/frontend/MyCompany/MyTheme/
Frage 7
Frage
You are describing the design scheduling to a merchant. What options are available for you to customize when applying a design change in Content > Design Schedule? (Select 2)
Antworten
-
Theme
-
Start/end dates
-
Layout Updates
-
Design change name
Frage 8
Frage
You are building a new theme for this purpose which three properties are set in theme.xml? (Select 3)
Frage 9
Frage
You are creating a uiComponent that is used on the checkout page that displays the customer's email address, with realtime updates as they change it How do you track the value of their email?
Antworten
-
In your uiComponent's configuration, add: imports: { "customer-email:email" }
-
Add 'Magento_Checkout/js/view/form/element/email' to the dependencies for your uiComponent.
-
In requirejs-config.js add:
{ "MyCompany_MyModule/js/email-signup" : { "listens": { "Magento_Checkout/js/view/form/element/email" }}}
-
In your uiComponents configuration, add: exports: {"customer-email:email"}
Frage 10
Frage
Your Customise Theme for template files with the same name which following override rules apply? (select 3)
Antworten
-
Themes should only be for applying changes to existing code.
-
Theme templates override module templates
-
Child theme templates override parent theme templates
-
New functionality should go into Theme specific to the use case
Frage 11
Frage
You are developing a German language theme for the Magento Marketplace named mytheme. In your Magento installation you have a third-party German language package installed. The theme “mytheme” already contains a mytheme/i18n/de_DE.csv file. The graphic designer wants you to rename the Add to Cart button to make the text shorter. Keeping upgradability in mind, where do you add the new string?
Antworten
-
Add the string to mytheme/i18n/de_DE.csv
-
Override the Magento_Catalog/view/frontend/templates/product/view/addtocart.phtml template in mytheme and replace the string
-
Add the string to the third-party German language package.
-
Add the translation to the core_translate database table.
Frage 12
Frage
You have written a customer uiComponent implementation that connects with a phtml template that is output into a pages's source. How do u connect uiComponent's Knockout features with the HTML element?
Antworten
-
Add data-bind="scope: 'your-uicomponent-name' " to your HTML element
-
Add targetElement: ".selector" to your uiComponent's defaults object
-
Add this.el =$('.selector'); to your uiComponent's constructor
-
Add link="uicomponents.your-uicomponent-name" to your HTML element
Frage 13
Frage
Which layout handles are always applied to a product page? (3)
Frage 14
Frage
You are auditing a module that contains phtml file: $product=$block->getProduct(); for($i=0;$i<count($products); $i++){ echo $products[i]->getName() } To comply with magento templete standards, what do you change? (Select 2)
Antworten
-
Change the { and } to : and endforeach; respectively
-
Change the for to foreach.
-
Change the $block->getProduct; to $block->getData('products');
-
Inside the for loop, add $product=$products[i]; & change the reference from $product[i] to $product
Frage 15
Frage
You need not use Common layout instructions Use layout instructions to customize your layout: What are the layout instructions <body></body> child ? (2)
Antworten
-
<action><attribute> <block> <container>
-
<move> <referenceBlock> <referenceContainer>
-
<title> <meta> <link> <css> <script>
-
<html> <head> <body> <update>
Frage 16
Frage
You are reviewing Luma theme Magento Theme that inherits from blank theme What directories are found in themes? (3)
Antworten
-
etc/
-
i18n/
-
web/
-
Observer/
-
Model/
Frage 17
Frage
You are working on a website that previous developer built on Magento, u've been taked with creating a form page for MyCompany_MyModule. MyCompany_MyModule contains following etc/frontend/routes.xml:
<?xml version="1.0"?> <config> <router id="standard">
<route id="product_list" frontName="products">
<module name="MyComany_MyModule"/> </route> </router> </config>
Controller is located in app/code/MyCompany/MyModule/Controller/Display/Grid.php. What is correct layout handle associated with this?
Antworten
-
products_list_display_grid
-
category_products_display_grid
-
category_products_list_grid
-
category_products_view_grid
Frage 18
Frage
How to override an existing Magento 2 jQuery UI widget?
Antworten
-
add My/Mod/view/frontend/requirejs-confg.js
-
add My/Mod/view/frontend/web/js/tabsmixin.js
-
edit lib/web/mage/list.js
-
extent vendor/magento/magento2-base/lib/web/mage/menu.js
Frage 19
Frage
You override price-utils.js specific method as below
// My/Mod/view/frontend/js/price-utilsoverride.js
defne([], function() {
var updates = {
formatPrice: function(amount, format, isShowSign){ return '00000';}
};
return function(target) { return Object.assign(target, updates);}
});
Where u add requirejs-confg.js in My_Mod?
Antworten
-
My/Mod/view/requirejs-confg.js
-
My/Mod/frontend/view/requirejs-confg.js
-
My/Mod/templete/layout/requirejs-confg.js
-
My/Mod/web/requirejs-confg.js
Frage 20
Frage
You are reviewing XML head as : <?xml version="1.0"?>
<page xmlns:xsi="http://www.
w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/
Layout/etc/page_confguration.xsd">
<body>...
What type of declaration does it mean?
Antworten
-
uiComponent
-
Theme
-
RequirJS
-
KnockoutJs
Frage 21
Frage
Where are the CSS merging and minification options found?
Antworten
-
Stores > Configuration > Advanced > Developer > JavaScript Settings >Merge JavaScript Files
-
Content > Design >Theme>Advanced >JavaScript Settings>Merge JavaScript Files>Yes
-
Stores > Configuration >Developer>Advanced >JavaScript Settings>Merge JavaScript Files>Yes
-
Stores > Configuration > Advanced > Developer > CSS Settings
Frage 22
Frage
You are working with high level magento partner company developing a new theme that no parent theme exists & Also use to composer installation Which file are required in a theme? Select all that are required.(3)
Antworten
-
/registration.php
-
/theme.xml
-
/etc/view.xml
-
/composer.json
-
/web/js
-
i18n/en_US.csv
Frage 23
Frage
Which of the following is a Knockout virtual element?
Antworten
-
<!-- ko foreach: payments --><li data-bind="text: $data.name"></li> <!-- /ko -->
-
<li class="heading">My heading</li>
-
<div data-bind="payments: payments">
-
<div data-init="payments: payments">
Frage 24
Frage
What is Magento 2 Themes improvements than 1 ? such as the use of_____________________ to name a few.(Select 4)
Frage 25
Frage
You have tasked with creating _theme.less is for redefining to your theme globally, Which below are correct ? (3)
Antworten
-
create variables
-
defining new variables
-
mixins that apply
-
create block
-
create Weget
Frage 26
Frage
You want to use Magento 2 library in your theme , Where is UI library has some built-in documentation & how access?
Antworten
-
in: /lib/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
-
in: /module/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
-
in: /theme/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
-
in: /plugin/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
Frage 27
Frage
Where is UI Library variables defined n Magento Blank?
Antworten
-
Each of LESS files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/css/source/lib/variables.
-
Each of JS files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/js/source/lib/variables.
-
Each of PHTML files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/html/source/lib/variables.
-
Each of php files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/php/source/lib/variables.
Frage 28
Frage
You are troubleshooting a US website that sells discs of sandpaper. There is Js syntax error in this code:"unknown character',' ". Template: <sc>var productName= "<?=$blcok->get </sc> Which renders to: <
<sc> var productName = "SuperSandpaper disc, 6 ", 100 grit"; </sc>
Antworten
-
Change the $block->getProductName(); to $block->escapeJs($block->getProductName());
-
Change the var productName ="<?=$block->getproductName; ?> to
var productName = <<<PRODUCTNAME <?=$block->getproductName; ?> PRODUCTNAME;
-
Change the $block->getProductName(); to $block->escapeHtml($block->getProductName());
-
Change the $block->getProductName(); to $block->escapeChar($block->getProductName());
-
Modify the block's getProductName() methods to add a slash in front of the result
Frage 29
Frage
What is the custom LESS directive added by Magento in order to implement a fallback system in the import mechanism?
Antworten
-
//@magento_import
-
//@mage_import
-
//@magento_imports
-
//@mage_imports
Frage 30
Frage
What is the correct way to Combinator indents add spaces before and after combinators. Less coding standard?
Antworten
-
.nav + .bar {
color: @bar__color;
}
-
.nav+.bar {
color: @bar__color;
}
-
.nav +.bar {
color: @bar__color;
}
-
.nav+ .bar {
color: @bar__color;
}
Frage 31
Frage
If you need to override a module layout, where would you put the layout file?
Antworten
-
<module_dir>/view/frontend/layout/<layout1>.xml
-
<theme_dir>/<Namespace>_<Module>/layout/<layout1>.xml
-
<Namespace>_<Module>/<theme_dir>/layout/<layout1>.xml
-
<theme_dir>/view/frontend/layout/<layout1>.xml
Frage 32
Frage
Templates are stored in the following locations:
Antworten
-
<module_dir>/view/frontend/templates/<path_to_templates>
-
<theme_dir>/<Namespace>_<Module>/templates/<path_to_templates>
-
<theme_dir>/<Namespace>_<Module>/view/frontend/templates/<path_to_templates>
-
<theme_dir>/<Namespace>_<Module>/view/templates/<path_to_templates>
Frage 33
Frage
Using PHP short tags in template PHTML files
Antworten
-
<?= $block->getAdjustmentsHtml() ?>
-
<?php echo $block->getAdjustmentsHtml() ?>
-
<?php echo $block->returnAdjustmentsHtml() ?>
-
<?= $block->returnAdjustmentsHtml() ?>
Frage 34
Frage
Customize header and footer templates?
Antworten
-
<Magento_Email_module_dir>/view/frontend/email/header.html
-
<Magento_Email_module_dir>/view/frontend/email/footer.html
-
<Magento_Email_module_dir>/view/frontend/email/default.html
-
<Magento_Email_module_dir>/view/frontend/email/emailBody.html
Frage 35
Frage
Media queries in Magento default themes
Antworten
-
Media queries @media-common, max screen__s and max screen__m will be added to styles-m.css.
-
Media queries min screen__m and min screen__l will be added to styles-l.css.
-
Media queries min screen__m and min screen__l will be added to style-l.css.
-
Media queries @media-common, max screen__s and max screen__m will be added to style-m.css.
Frage 36
Frage
You are Creating a mobile-specific theme
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<remove src="css/styles-l.css" />
</head>
</page>
Where you add this file to get your own style?
Antworten
-
<theme_dir>/Magento_Theme/layout/default_head_blocks.xml
-
<theme_dir>/Magento_Theme/layout/frontend/default_head_blocks.xml
-
<theme_dir>/Magento_Theme/template/default.phtml
-
<theme_dir>/Magento_Theme/layout/html/header.xml
Frage 37
Frage
To call a mixin with parameter values different from default, set these values when calling the mixin, like in the following example:
Which correct with specifying any parameters?
Antworten
-
.example-button {
.lib-button(
@_button-padding: @button-padding,
@_button-color: #fff,
@_button-color-hover: #ccc
);
}
-
.breadcrumbs {
.lib-breadcrumbs();
}
-
.example-button {
.lib-button();
}
-
.breadcrumbs {
.lib-breadcrumbs();
.lib-button();
}
Frage 38
Frage
Example of the accordion initialization with the active option specified: Which is correct? (Select 2)
Antworten
-
$("#element").accordion({ active: "0 1"});
-
$("#element").accordion({ active: [0,1]});
-
$("#element").accordion.active: (0 1);
-
$("#element").accordion.active: [0, 1];
Frage 39
Frage
You are going to create widget named Samplewidget. where you declare widget?
Antworten
-
etc/widget.xml
-
etc/di.xml
-
etc/config.xml
-
etc/system.xml
Frage 40
Frage
What happens if you use a {{block id="my_id"}} template directive like this?
Antworten
-
The Cms block with the identifier "my_id" is outputted
-
An empty block with the class \Magento\Framework\View\Element\Template and a name of "my_id" is created
-
There is an error because the block id must be numeric
-
There is an error because the block id can not contain special character(_)