Wednesday, May 16, 2018

UPWORK MAGENTO TEST ANSWER 2018 TOP 10%

Here are all Magento 1 And Magento 2 Question And Answers :
1. How can you extend Bundle updates product listing using the grid UI component located?
Magento/BundleStaging/product/adminhtml/ui_component/bundle_update_product_listing.xml
a. Yes
b.It should be Magento/BundleStaging/view/adminhtml/ui_component/bundle_update_product_listing.xml
c.No, It should be
Magento/BundleStaging/controller/adminhtml/ui_component/bundle_update_product_listing.xml
d.None
of Abobe
Answer
: b
.Itshould be
Magento/BundleStaging/view/adminhtml/ui_component/bundle_update_product_listing.xml
2.When you want to change the behavior of the magento core modules which of
the following method is acceptable ?
a.Patching the core files.
b.Overriding a class by xml rewrite.
c.Move core modules into local directory and apply your changes.
d. overriding a class by copying the core file to local directory .
Answer : C. Move core modules into local directory and apply your changes.
3.which endpoint is used for user authorization (customer)?
a../oauth/intiate
b./oauth/authorize
c./admin/oauth_authorize
d./oauth/token
Answer B ./oauth/authorize
4.how many code pools does magento have?
a.1
b.2
c.3
d.4
Answer C: 3
5.what happens when you edit an existing order using the order management page?
a.Depending on the order status ,different editing form appear for the current order
b.The current oreder is cancelledand a new order is created from scratch based on the
current order’s data.
c. It will work well and let me edit the order
d.From appears that allows you to edit shopping information for the current order only
Answer B.The current oreder is cancelledand a new order is created from scratch based on the current order’s data.
7.which statement is correct regarding theme ‘s registration.php file?
a.It contains the basic meta information like the theme name and the parent theme name ,
and theme is inherited from an existing theme .
b.It is required to register your theme in the system .
c.This file is optional
d.describe the theme dependencies and some meta information.
Answer b.It is required to register your theme in the system .
8.Static __ is a silent function of a class,which is stored in the memory space of a class (not object) ?
a.Variable
b.Function
c.Page
d.Method
Answer a.Variable
9.Which of the following are the method of payment gateways ?
Note:there may be more thanone right answer.
a.Payflow pro(includes express checkout)
b.Payflow link(includes express checkout)
c.Payflow add (includes express checkout)
d.Payflow list (includes express checkout)
Answer a.Payflow pro(includes express checkout)
10.which code is used to specify javascript resources maping?
a.Var config={
paths:{
//configuration for resources ‘app/code/magento/catalog/controller/frontend/product/product.js’
product”:”./product/product”
}
};
b. Var config={
paths:{
//configuration for resources ‘app/code/magento/catalog/view/frontend/product/product.js’
product”:”./product/product”
}
};
c. Var config={
paths:{
//configuration for resources ‘app/code/magento/catalog/model/frontend/product/product.js’
product”:”./product/product”
}
};
d. Var config={
paths:{
//configuration for resources ‘app/code/magento/catalog/js/frontend/product/product.js’
product”:”./product/product”
}
};
Answer B.
11.which code is used to include cms in block in template file(.phtml)?
a.echo $this->getLayout()->createBlock(‘cms/block’)->setBlockHtml(‘static_block_id’)->toHTML();
b. echo $this->getLayout()->createBlockHTML(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();
c. echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId (‘static_block_id’)->toPHTML();
d. echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();
Answer D. echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();
12.which action should you perform to make it possible to display your custom attribute value on the product list .
a.Set ”used_in_product_listing ” property for this attribute to “1”
b.Rewrite the method mage_catalog_block_product_list::getproductcollection() to add additional attributes to select.
c.Observe the “catalog_product_collection load_before” event to add the attribute to select.
d.You can use “used_in_product_list” property for this attribute too “0”.
Answer A.Set ”used_in_product_listing ” property for this attribute to “1”
13.which of the following is not a magento cache type ?
a.Configuration
b.Page cache
c.Entity Attribute value(EAV)
d.DML
e.DDL
Answer D.DML
14.whic magento command is used to display the current deployment mode.
a.Magent deploy:mode
b. Magent mode:show
c.magento deploy :mode:show
d:none of the above
Answer C.magento deploy :mode:show
15.which option are correct about optimize magento configuration?
a.To speed up magento performance ,don’t run mysql and web server on the same machine
b.Do not host files on your web server that you do not use
c.Optmization of session storage ,identification and disabling of unused magento modules
d.Enabling magento flat catalog.(magento uses a complex and resources intensive entity
attribute value [or EAV] based catalog).after initial catalog establishment,enabling the flat catalog can dramatically improve database querrying time.
e.All of the above
Answer E.All of the above
18.to create a base grid block you need to define the following function ?
a.getMassactionBlock()
b_prepareMassactions()
c._prepareMassaction()
getMassactionBlock()
Answer C._prepareMassaction()
19.how do you change an order status to complete ?
a.Directly in the database
b.By clicking complete button
c.you need to create shipping for order
d.you need to create invoice and shiping
Answer B.By clicking complete button
20.What step during the layout loading is the node processed ?
a.After the generation of layout blocks
b.before the generation of layout update XML,but aftergenration of layout blocks
c.Before the generation of layout blocks but after the generation of layout XML
dAfter the genrationof layout block,but before rendring the page.
Answer D. After the genration of layout block,but before rendring the page.
21.Which of the following piece of code can be used to get magento clients by paymet method ?
a.$collection=
Mage::getResourceModel(‘sales/order_payment_collection’)->addFieldToSelect(‘*’)->addFieldToFilter(‘Method’,mundipagg_boleto”);
Foreach($collection as $orderPayment){
$orderId=$orderPayment->getParentId();
$order=Mage::getModel(‘sales/order’)->load($orderId);
$customerId=$order->getCustomerId();
}
b. $collection=
Mage::getResourceModel(‘sales/order_payment_collection’)->addFieldToSelect(‘*’);
Foreach($collection as $method){
If($method->getMethod()==”mundipagg_boleto”){
Print $method->get_method().”</br>”;
}
}
c. $collection=
Mage::getResourceModel(‘sales/order_payment_collection’)->addFieldToSelect(‘*’)->addField (‘Method’,mundipagg_boleto”);
Foreach($collection as$method){
If($method->getMethod()==”mundipagg_boleto”){
Print $method->get_method().”<br>”;
}
}
d. $collection=
Mage::getResourceModel(‘sales/order_payment_collection’)->addFieldToSelect(‘*’)->addField (‘Method’,mundipagg_boleto”);
Foreach($collection as $Method){
If($Method->getMethod()==”mundipagg_boleto”){
Print $method->getMethod().”<br>”;
}
}
e.all of the above
Answer : A
22.magento has the following codepool?
a.Community advanced and local
b.Core,community and local
c.Reomte ,core and community
d.None of the above
Answer b.Core,community and local
23.which of the following is not a magento module?
a.Core Modules
b.Community modules
c.Commercial modules
d.complex Modules
Answer d.complex Modules
24.what function do we use to filter a product collection ?
A.addFieldToFilter()
b.addattributetoFilter()
c.addWhere()
d.filterByField()
Answer b.addattributetoFilter()
25.magento is the file format for a data upgrade script?
a.{module}.v2.php
b.install-data-v2-{$module}.php
c.upgrade0.0.2.php
d. data-upgrade-0.0.1-0.0.2.php
Answer c.upgrade0.0.2.php
26.what is required for installing magento extention on a custom theme.
a.<current theme package> – -> <current theme folder>
b. <current theme package> – -> <default folder in current theme’s package>
c.base  default folder
d.all of the above
Answer d.all of the above
27.what function fits in the code snippet?
Class Namespace_ModuleBlock_content extends Mage_core_Block_Template{
Protected function __construct(){
Parent::__construt(‘namespace/module/content.phtml’)
}
}
a.setTemplate
b.setView
c.setViewFile
d.setLayout
Answer d.all of the above
28.which statement is false about a service contact?
a.it enables magento and third party devlopers to report sytem dependent through composer json file and consequently guarantee compatibility among magento version
b.A service contact includes data interfaces which preserve data integrity ,and services interfaces
which hide business logic details from service requestors such as controllers web services and other modules .
c.Magento is modular system that enables third party developers to customize and overwrite core parts of its frame works this flexibility comes for free
d.Aservices contact is set of php interfaces that are defined for a module .
Answer c.Magento is modular system that enables third party developers to customize and overwrite core parts of its frame works this flexibility comes for free
29.which theme file define the location of information in magento 2.0?
a.Signup.php
b.Registration.php
c.new.php
d.frontend.php
Answer b.Registration.php
30.the controller action_________method is called each before calling the action method itself?
a.Predispatch
b.preAction
c.beforeDispatch
d.brforeAction
Answer a.Predispatch
31.a gift registry will hold the following information ?
a.List of product
b.event Location
c.Event name
d.Event id
Answer a.List of product
32.which of the following is not vailed for service layer?
A.reside below the domain layer and above the presentation layer .
b.contain services contracts which define how the implementation will behave .
c.provide an easy way to access the REST/SOAP API framework code.
d. Provide a stable a API for other modules to call into.
Answer A.reside below the domain layer and above the presentation layer .
33.when are using .htaccess how can you redirect all admin page in magento to another domain and subdirectory?
a. RewriteEngin on
RewriteEngin{REQUEST_URI} !^/(media|skin|js)/
Rewritecond%{REQUEST_URI} !admin
Rewrite Cond %{REQUEST_URI}!index.php[nc]
b. RewriteEngin on
RewriteCond{REQUEST_URI} !^/index/.php/admin[NC]
RewriteCond%^.[L]
Rewrite Cond %{The REQUEST }!new/ [nc]
RewriteRule!^new//new%{REQUEST_URI}[NC,R=301,L]
c. RewriteEngin on
RewriteCond{REQUEST_URI} !^/index/.php/admin[NC]
RewriteRule%^.[L]
Rewrite Cond %{The REQUEST }!new/ [nc]
RewriteRule!^new//new%{REQUEST_URI}[NC,R=301,L]
d.all of the above
Answer a.
34.who use the presentation layer ?
a.web users
b.system administrators
c.Web API calls
d.All of the above
Answer d.All of the above
35.what is the purpose of the FLAG_NO_REDIRECT_URL controller flag?
a.it does not perform a redirection .
b.it does not redirect to an external url
c.It does not redirect to external url but allow internal forwarding
d.There is no such flag in magento controllers
Answer a.it does not perform a redirection .
36.which command allow you to reset magento files and Directory permissions?
a.find .-type f –exec chmod 755{};
find . –type d –exec chmod 644{};
chmod x mage
b. find .-type f –exec chmod 644\{};
find . –type d –exec chmod 755\{};
chmod +x mage
c. find .-type f –exec chmod 755{};
find . –type d –exec chmod 644{};
chmod x mage
d. find .-type f –exec chmod 644{}\;
find . –type d –exec chmod 755{}\;
chmod +x mage
Answer d. find .-type f –exec chmod 644{}\;
find . –type d –exec chmod 755{}\;
chmod +x mage
37.which inventory API allows you to reterive the list of stock data by product ids?
a. cataloginventory_stock_item_list()
b. cataloginventory_stock_item_update()
c. cataloginventory_stock_item_find()
d.All of the above
Answer a. cataloginventory_stock_item_list()
38.which of the following code snippets changes the positions of the compare product block in the right column?
a.<refrance name=”right”>
<action method=”unsetchild”>
<block>catalog.compare.sidebar</block>
</action>
<action method=”insert”>
<block>catalog.compare.sidebar</block>
<sublingname>right.permanent.callout</sublingname>
<after></after>
</action>
</refrence>
b. <refrance name=”right”>
<action method=”move”>
<block>catalog.compare.sidebar</block>
<block>catalog.compare.sidebar</block>
<sublingname>right.permanent.callout</sublingname>
<after></after>
</action>
</refrence>
c. <action method=”move” block=”right”>
<block>catalog.compare.sidebar</block>
<sublingname>right.permanent.callout</sublingname>
<after></after>
</action>
d. <action method=”copy” block=”right”>
<block>catalog.compare.sidebar</block>
<sublingname>right.permanent.callout</sublingname>
<after></after>
</action method=”remove” block=”right”>
<block>catalog.compare.sidebar</block>
</action>
Answer a.
39.which of the following extensions are required for installing magento ?
a.curl
b.intl
c.mhash
d.poo/MySql
d.all of the above
Answer d.all of the above
40. Which command can you use to clear the directories?
rm -rf <your Magento install dir>/var/data/* <your Magento install dir>/var/generation/*
rm -rf <your Magento install dir>/var/di/* <your Magento install dir>/var/generation/*
rm +rf <your Magento install dir>/var/di/* <your Magento install dir>/var/generation/*
rm -rf <your Magento install dir> -> /var/di/* <your Magento install dir>/var/generation/*
Answer C. allow all available countries
41.What does the following tag mean in module’s config.xml file?
<sallowspecific>0</sallowspecific>
allow all available countries
allow all countries specified in the country list
shipping not allowed
None of the above
Answer A. allow all available countries
42. Which of the following aspects to the define RESTful API of Magento?
Note: There may be more than one right answer.
Its exposed URIs are formatted in a directory-like structure
It makes usage of the standard of HTTP methods, GET, POST, DELETE, and SEND
It uses JSON or XML to transfer information
Answer C. 
It makes usage of the standard of HTTP methods, GET, POST, DELETE, and SEND
It uses JSON or XML to transfer information
43. The data model is based on the Entity-attribute-value _____ that stores data objects in tree structures?
rendering
model
class
modal
Answer B. model
44. What is the difference between subtotal price and base subtotal?
Base subtotal is in the customer’s currency and subtotal is in your shop’s base currency
Subtotal in the customer’s currency and base subtotal is in your shop’s base currency
Subtotal includes taxes, base subtotal does not
Nothing special, it’s the same value
Answer B. Subtotal in the customer’s currency and base subtotal is in your shop’s base currency
45.Which relationship is not possible between two modules?
uses
reacts to
customizes
moves
replaces
Answer C. moves
46.Which of the following files does Magento use to detect maintenance mode?
var/.maintenance.flag
var/.maintenance.mg
var/.maintenance
None of the above
Answer A. var/.maintenance.flag
47. What actions are performed in this code?
$model = Mage::getModel(‘your_module/model’);
$model->load($id);
$model->setData(‘name’, ‘value’);
$model->load($id);
$model->save();
Model data was loaded from the database and saved twice, because load() calls save() if any data was changed
Model data was loaded twice, but was not saved
Model data was loaded from the database twice and saved into the database with a new property value
Model data was loaded once, but was not saved.
Answer A. Model data was loaded twice, but was not saved
48. CRUD stands for the four basic types of database operations , , _____, and delete?
read,write,update
update, read,write
load, write,read
create, read, update
Answer D. create, read, update
49.Which of the following is not a Magento product type?
Simple Product
Complex Product
Grouped Product
Configurable Product
Virtual Product
Answer B. Complex Product
50.What function renders a Magento block?
_renderBlock
_toHtml
_render
_echoContents
Answer A. _renderBlock
51.If module A declares a dependency upon Module B, which of the following is not valid to declare such dependency?
In Module A’s module.xml file, Module B is listed in the <sequence> list
declare a dependency upon Module B in A’s composer.json
declare a dependency upon Module A in B’s composer.json
in the deployment configuration, Modules A and B must both be defined as enabled.
Answer C. declare a dependency upon Module A in B’s composer.json
52.What is stored in the var directory?
Various temporary data, such as log, cache and session files.
Variable values that are shared with third-party systems.
Variable values that are defined for Magento configuration.
Answer A. Various temporary data, such as log, cache and session files.
D. The status is a child of the state.
53. Which statement correctly describes order state and order status?
A.State and status are independent properties of the order.
B. An order doesn’t have a status, only a state. Status is a property of an invoice, shipment, and credit memo.
C. State represents the general state of the order, while status works on item level.
D. The status is a child of the state.
Answer D. The status is a child of the state.
54.How can you access the Magento theme directory?
A.Mage::getSingleton(‘core/design_package’)->getSkinBaseDir()
B. Mage::getBaseDir(‘skin’);
C.$this->getSkinUrl()
D. All of the above
Answer D. All of the above
55.What model property is responsible for the naming of this event: “catalog_product_after_load”?
$_eventName property
$_eventDataKey property
$_eventObject property
$_eventPrefix property
Answer D. $_eventDataKey property

No comments:

Post a Comment