Pregunta 1
Pregunta
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)
Respuesta
-
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
Pregunta 2
Pregunta
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> ?
Respuesta
-
<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
Pregunta 3
Pregunta
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?
Respuesta
-
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.
Pregunta 4
Pregunta
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?
Respuesta
-
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
Pregunta 5
Pregunta
Without customization, what types are filtered through the magento2 directives parser? (2)
Respuesta
-
CMS blocks
-
CMS Pages
-
Module
-
Theme
Pregunta 6
Pregunta
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?
Respuesta
-
app/design/frontend/MyCompany/MyTheme/
-
vendor/mycompany/my-theme/
-
app/design/MyCompany/MyTheme/frontend/
-
lib/themes/frontend/MyCompany/MyTheme/
Pregunta 7
Pregunta
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)
Respuesta
-
Theme
-
Start/end dates
-
Layout Updates
-
Design change name
Pregunta 8
Pregunta
You are building a new theme for this purpose which three properties are set in theme.xml? (Select 3)
Pregunta 9
Pregunta
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?
Respuesta
-
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"}
Pregunta 10
Pregunta
Your Customise Theme for template files with the same name which following override rules apply? (select 3)
Respuesta
-
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
Pregunta 11
Pregunta
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?
Respuesta
-
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.
Pregunta 12
Pregunta
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?
Respuesta
-
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
Pregunta 13
Pregunta
Which layout handles are always applied to a product page? (3)
Pregunta 14
Pregunta
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)
Respuesta
-
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
Pregunta 15
Pregunta
You need not use Common layout instructions Use layout instructions to customize your layout: What are the layout instructions <body></body> child ? (2)
Respuesta
-
<action><attribute> <block> <container>
-
<move> <referenceBlock> <referenceContainer>
-
<title> <meta> <link> <css> <script>
-
<html> <head> <body> <update>
Pregunta 16
Pregunta
You are reviewing Luma theme Magento Theme that inherits from blank theme What directories are found in themes? (3)
Respuesta
-
etc/
-
i18n/
-
web/
-
Observer/
-
Model/
Pregunta 17
Pregunta
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?
Respuesta
-
products_list_display_grid
-
category_products_display_grid
-
category_products_list_grid
-
category_products_view_grid
Pregunta 18
Pregunta
How to override an existing Magento 2 jQuery UI widget?
Respuesta
-
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
Pregunta 19
Pregunta
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?
Respuesta
-
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
Pregunta 20
Pregunta
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?
Respuesta
-
uiComponent
-
Theme
-
RequirJS
-
KnockoutJs
Pregunta 21
Pregunta
Where are the CSS merging and minification options found?
Respuesta
-
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
Pregunta 22
Pregunta
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)
Respuesta
-
/registration.php
-
/theme.xml
-
/etc/view.xml
-
/composer.json
-
/web/js
-
i18n/en_US.csv
Pregunta 23
Pregunta
Which of the following is a Knockout virtual element?
Respuesta
-
<!-- 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">
Pregunta 24
Pregunta
What is Magento 2 Themes improvements than 1 ? such as the use of_____________________ to name a few.(Select 4)
Pregunta 25
Pregunta
You have tasked with creating _theme.less is for redefining to your theme globally, Which below are correct ? (3)
Respuesta
-
create variables
-
defining new variables
-
mixins that apply
-
create block
-
create Weget
Pregunta 26
Pregunta
You want to use Magento 2 library in your theme , Where is UI library has some built-in documentation & how access?
Respuesta
-
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,
Pregunta 27
Pregunta
Where is UI Library variables defined n Magento Blank?
Respuesta
-
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.
Pregunta 28
Pregunta
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>
Respuesta
-
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
Pregunta 29
Pregunta
What is the custom LESS directive added by Magento in order to implement a fallback system in the import mechanism?
Respuesta
-
//@magento_import
-
//@mage_import
-
//@magento_imports
-
//@mage_imports
Pregunta 30
Pregunta
What is the correct way to Combinator indents add spaces before and after combinators. Less coding standard?
Respuesta
-
.nav + .bar {
color: @bar__color;
}
-
.nav+.bar {
color: @bar__color;
}
-
.nav +.bar {
color: @bar__color;
}
-
.nav+ .bar {
color: @bar__color;
}
Pregunta 31
Pregunta
If you need to override a module layout, where would you put the layout file?
Respuesta
-
<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
Pregunta 32
Pregunta
Templates are stored in the following locations:
Respuesta
-
<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>
Pregunta 33
Pregunta
Using PHP short tags in template PHTML files
Respuesta
-
<?= $block->getAdjustmentsHtml() ?>
-
<?php echo $block->getAdjustmentsHtml() ?>
-
<?php echo $block->returnAdjustmentsHtml() ?>
-
<?= $block->returnAdjustmentsHtml() ?>
Pregunta 34
Pregunta
Customize header and footer templates?
Respuesta
-
<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
Pregunta 35
Pregunta
Media queries in Magento default themes
Respuesta
-
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.
Pregunta 36
Pregunta
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?
Respuesta
-
<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
Pregunta 37
Pregunta
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?
Respuesta
-
.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();
}
Pregunta 38
Pregunta
Example of the accordion initialization with the active option specified: Which is correct? (Select 2)
Respuesta
-
$("#element").accordion({ active: "0 1"});
-
$("#element").accordion({ active: [0,1]});
-
$("#element").accordion.active: (0 1);
-
$("#element").accordion.active: [0, 1];
Pregunta 39
Pregunta
You are going to create widget named Samplewidget. where you declare widget?
Respuesta
-
etc/widget.xml
-
etc/di.xml
-
etc/config.xml
-
etc/system.xml
Pregunta 40
Pregunta
What happens if you use a {{block id="my_id"}} template directive like this?
Respuesta
-
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(_)