Skip to main content

Magento Test Upwork Answers 2019

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
1. Which of the following will display a customer’s TAX/VAT number?
Answers:
  1. $taxvat = $order[‘customer_taxvat’];
  2. $order->getData(‘customer_taxvat’);
  3. $order->getQuote()->getCustomerTaxvat();
  4. $order->getData()->getCustomerTaxvat();
2. Why does the error, “front controller reached 100 router match iterations”, occur?
Answers:
  1. There is an error in the code.
  2. Some modules failed to load.
  3. Router references were set incorrectly.
  4. .htacces is blocking URLs.
3. Which of the following will sort products in the catalog by the date they were added?
Answers:
  1. Under “app/code/core/Mage/Catalog/Model/Config.php”, add this value to the $options array: ‘created_at’ => Mage::helper(‘catalog’)->__(‘Date’)
  2. Under “app/code/core/mage/catalog/model/resource/eav/mysql4/product/collection.php”, add this value to the $options array: $this->getSelect()->order(“e.entity_id desc”);
  3. Under “app/code/core/Mage/Catalog/Model/Config.php”, add this value to the $options array: ‘sort_by’ => Mage::helper(‘catalog’)->__(‘Date’)
  4. It’s not possible to sort products in the catalog by date.
4. Is it possible to trigger an event after an order has been set to “processing”?
Answers:
  1. Yes, by using a custom module.
  2. Yes, by registering an event.
  3. No, since it’s a security threat.
  4. No, since no additional action can be added at this stage.
5. Which of the following code samples will get all products sorted by ‘position’, assuming ‘position’ is of a numeric type?
Answers:
  1. $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’) ->addAttributeToSort(‘position’, ‘ASC’); ->load();
  2. $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’) ->addOrder(‘position’, ‘ASC’); ->load();
  3. function cmp($a, $b) { if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; } $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’) ->load(); usort($products, “cmp”);
  4. function mySortByPosition($a, $b) { if ($a[‘position’] == $b[‘position’]) { return 0; } return ($a[‘position’] < $b[‘position’]) ? -1 : 1; } $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’) ->addSorter(mySortByPosition) ->load();
6. Which of the following statements are correct about Magento quotes?
Answers:
  1. Quotes are offers to the user, which if the user accepts get converted into orders.
  2. The lifetime of the quote cannot be controlled.
  3. Quotes don’t deal with metadata about the store.
  4. Quotes are not related to order payment and shipping method information.
7. Select which method will register observers/hooks to events in Magento:
Answers:
  1. Mage::registerObserver(‘<EventNameToHook>’,’MyClass::observerFunction’);
  2. Using the option in the Magento Admin panel: System > Configuration > Advanced > Developer > Register Observer
  3. Registering observers using the XML layout of the module: <events> <EVENT_TO_HOOK> <observers> <module> <type>singleton</type> <class>company_module_model_observer</class> <method>methodToCall</method> </module> </observers> </EVENT_TO_HOOK> </events>
  4. Mage::registerObserver(‘myglobalobserver’); Function myglobalobserver($event,$args){ switch($event){ case ‘event1’: processevent1($args); break; case ‘event2’: processevent2($args); break; } }
8. Magento has the ability to run multiple stores from the same database. After adding the new store from System -> Manage Store, what is the correct code to add to the htaccess file to make Magento automatically load the new store?
Answers:
  1. RewriteCond %{HTTP_HOST} ^oldstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourOldStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
  2. RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourNewStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
  3. RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
  4. RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourNewStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
9. Which of the following will save a custom session variable in Magento?
Answers:
  1. $_SESSION[‘name’] = ‘frontend’;
  2. $session = Mage::getSingleton(“core/session”, array(“name”=>”frontend”)); $session->setData(“device_id”, 4);
  3. Mage::getSingleton( ‘customer/session’ )->setValue( ‘name’, array( 1, 2, 3 ) );
  4. None of the above
10. Which of the following will get information (‘customer_referrer_id’) from a currently logged-in admin user?
Answers:
  1. $collection->addAttributeToFilter(‘customer_referrer_id’, $referrer_id); $referrer_id = Mage::getSingleton(‘admin/session’)->getUser()->getId();
  2. $collection->addAttributeToSelection(‘customer_referrer_id’, $referrer_id); $referrer_id = Mage::getSingleton(‘admin/session’)->getUser()->getId();
  3. $collection->addAttributeToFilter(‘customer_referrer_id’, $referrer_id); $referrer_id = getSingleton(‘admin/session’)->getUser()->getId();
  4. None of these.
11. Which of the following will display a product’s thumbnail?
Answers:
  1. $product->hasThumbnail()) $product->setThumbnail($product->getImage());
  2. <img src=”<?php echo $this->helper(‘catalog/image’)->init($_item->getProductThumbnail(), ‘image’)->resize(50); ?>” alt=”<?php echo $_item->getName() ?>” />
  3. <img src=”<?php echo $_item->getProduct()->getThumbnailUrl() ?>” alt=”<?php echo $_item->getName() ?>” />
  4. <img src=”<?php echo $this->helper(‘catalog/image’)->init($_item->getProduct(), ‘thumbnail’)->resize(50); ?>” alt=”<?php echo $_item->getName() ?>” />
12. Consider the following code:
<block type=”A/B” name=”root” output=”toHtml” template=”example/view.phtml”>
What is the meaning of A/B?
Answers:
  1. “Module’s alias” / “Class name relative to the alias”
  2. “Controller’s Alias” / “Class name relative to the alias”
  3. “Controller’s Class” / “Method Name”
  4. “Method Name” / “Parameter”
13. Which of the following code samples will display a list of both active and inactive sub-categories of the current category?
Answers:
  1. <?php $_category = $this->getCurrentCategory(); $collection = Mage::getModel(‘catalog/category’)->getCategories($_category->entity_id); $helper = Mage::helper(‘catalog/category’); foreach ($collection as $cat): if($_category->getIsActive()): $cur_category = Mage::getModel(‘catalog/category’)->load($cat->getId()); ?> <a href=”<?php echo $helper->getCategoryUrl($cat);?>”> <?php echo $cat->getName();?> </a> <?php endif; endforeach; ?>
  2. <?php $_category = $this->getCurrentCategory(); $collection = Mage::getModel(‘catalog/category’)->getCategories($_category->entity_id); $helper = Mage::helper(‘catalog/category’); foreach ($collection as $cat): $cur_category = Mage::getModel(‘catalog/category’)->load($cat->getId()); ?> <a href=”<?php echo $helper->getCategoryUrl($cat);?>”> <?php echo $cat->getName();?> </a> <?php endforeach; ?>
  3. <?php $_helper = Mage::helper(‘catalog/category’); $_categories = $_helper->getStoreCategories(); if (count($_categories) > 0): foreach($_categories as $_category): ?> <a href=”<?php echo $_helper->getCategoryUrl($_category) ?>”> <?php echo $_category->getName() ?> </a> <?php endforeach; endif; ?>
  4. None of the above.
14. Which of the following will return a visitor’s UserAgent information?
Answers:
  1. Mage::helper(‘core/http’)->getHttpUserAgent()
  2. Mage::helper(‘core/mage’)->getHttpUserAgent()
  3. Mage::helper(‘core/mage’)->getHttpAgent()
  4. Mage::helper(‘core/http’)->getHttpUserServer()
15. How can account navigation links be changed?
Answers:
  1. Using an XML file to define the template
  2. Using a third party module
  3. Either using an XML file to define the template, or using a third party module
  4. None of these.
16. Which of the following will correctly add a custom event in Magento?
Answers:
  1. Mage::registerEvent
  2. Mage::dispatchEvent
  3. Mage::addAction
  4. Mage::registerObserverEvent
17. Which XML file(s) should be checked when the following Magento error occurs during installation?
“PHP Extensions “0” must be loaded”
Answers:
  1. config.xml in app/code/core/Mage/Install/etc
  2. install.xml in app/code/core/Mage/Install/etc
  3. extensions.xml in app/code/core/Mage/Install/etc
  4. None of these
18. Which of the following will set a template only if a particular module is disabled in Magento?
Answers:
  1. <action method=”setTemplate” ifconfig=”advanced/modules_disable_output/Myname_Mymodule”> <template>mytemplate.phtml</template> </action>
  2. Using File: app/code/core/Mage/Core/Model/Layout.php protected function _generateAction($node, $parent) { if (isset($node[‘ifconfig’]) && ($configPath = (string)$node[‘ifconfig’])) { if (!Mage::getStoreConfigFlag($configPath)) { return $this; } }
  3. <action method=”setTemplate”> <template helper=”mymodule/myhelper/switchTemplateIf”/> </action>
  4. None of these.
19. Which of the following XML files will remove an item from Magento’s admin panel navigation?
Answers:
  1. <?xml version=”1.0″ ?> <config> <menu> <xmlconnect> <disabled>1</disabled> </xmlconnect> </menu> </config>
  2. <?xml version=”1.0″ ?> <config> <menu> <xmlconnect> <hide>1</hide> </xmlconnect> </menu> </config>
  3. <?xml version=”1.0″ ?> <config> <menu> <xmlconnect> <delete>1</delete> </xmlconnect> </menu> </config>
  4. Items under the Magento admin panel can’t be removed.
20. Which of the following will get active store information (such as the store’s name) in Magento?
Answers:
  1. Mage::app()->getStore();
  2. Mage::app()->getStoreId();
  3. Mage::app()->getName();
  4. None of the above
21. What is the best way to store session values in Magento?
Answers:
  1. $myValue=’Hello world’; Mage::getSingleton( ‘customer/session’ )->setMyValue($myValue);
  2. $myValue=’Hello world’; Mage::getSingleton( ‘core/session’ )->setMyValue($myValue);
  3. $myValue=’Hello world’; Mage::getSingleton( ‘core/variable’ )->setMyValue($myValue);
  4. $myValue=’Hello world’; $_SESSION[‘MyValue’] = $myValue;
22. The “Suspected Fraud” Order status is grouped under which state?
Answers:
  1. Processing state
  2. Payment Processing state
  3. Pending shipment state
  4. Payment Review state
23. Which of the following needs to be edited to input and display the order attributes in Magento?
Answers:
  1. /app/design/adminhtml/default/default/template/sales/order/view/info.phtml
  2. /app/design/adminhtml/default/default/template/salesext/edit_form.phtml
  3. /app/code/local/CWACI/SalesExt/controllers/Adminhtml/Sales/OrderController.php
  4. Both /app/design/adminhtml/default/default/template/sales/order/view/info.phtml and /app/code/local/CWACI/SalesExt/controllers/Adminhtml/Sales/OrderController.php
24. When using a custom Magento logo as the default logo for transactional emails; which of the following is the correct way for the logo to be maintained even after Magento system upgrades?
Answers:
  1. Replace the logo in the base theme skin directory.
  2. Create a new theme and replace the new logo in the skin directory.
  3. Update the logo in all transactional emails.
  4. Create a new theme and place the new logo, named as “logo_email.png”, in the skin directory.
25. When does the following error occur? “Not all products are available in the requested quantity”
Answers:
  1. When the products are out of stock, but the cart still proceeded to checkout
  2. When the products are in stock, but not in the cart
  3. When no products are available
  4. None of these.
26. Which of the following will change the order of existing blocks via XML?
Answers:
  1. <reference name=”parent.block.name”> <action method=”unsetChild”><alias>child_block_alias</alias></action> <action method=”insert”><blockName>child.block.name</blockName><siblingName>name_of_block</siblingName><after>1</after><alias>child_block_alias</alias></action> </reference>
  2. <reference name=”parent.block.name”> <action method=”insert”><blockName>child.block.name</blockName><siblingName>name_of_block</siblingName><after>1</after><alias>child_block_alias</alias></action> <action method=”unsetChild”><alias>child_block_alias</alias></action> </reference>
  3. <reference name=”child.block.name”> <action method=”unsetParent”><alias>child_block_alias</alias></action> <action method=”insert”><blockName>parent.block.name</blockName><siblingName>name_of_block</siblingName><after>1</after><alias>child_block_alias</alias></action> </reference>
  4. It is not possible to edit the order of existing blocks.
27. Which of the following is the minimum memory requirement for running a Magento site?
Answers:
  1. at least 128MB
  2. at least 256MB
  3. at least 512MB
  4. over 512MB
28. How can the checkout process be skipped for downloadable products in Magento?
Answers:
  1. The checkout step cannot be skipped in Magento.
  2. Downloadable products automatically do not require checkout.
  3. There is an option in the admin panel to skip the checkout step for downloadable products.
  4. Magento does not support downloadable products.
29. Which of the following conditions must be met in order to successfully run a Magento install script?
Answers:
  1. The install script should be placed in MODULE/sql/RESOURCES_KEY/SCRIPT_NAME.
  2. The install script should be named using the convention, mysql4-install-MODULE_VERSION.php
  3. The module version in config.xml and in the install script file name must be same.
  4. All of these.
30. When migrating a Magento store to a new server, after moving the files and the database, where must the database access details be configured for the new server?
Answers:
  1. Database table ‘core_config_data’
  2. config.inc file at magento root
  3. app/etc/config.xml
  4. app/etc/local.xml
31. What is the best way to create global variables which can be used everywhere in Magento?
Answers:
  1. Creating a empty module and adding a system.xml file to it
  2. Using the Magento Admin panel: System > Custom Variables > create a new custom variable
  3. Via a Magento Session $myValue = ‘Hello World’; Mage::getSingleton(‘core/session’)->setMyValue($myValue);
  4. $myValue = ‘Hello World’; Mage::getModel(‘core/variable’)->addMyValue($myValue);
32. The browser is ignoring the file referred on the code below:
<link src=”http://siteurl.com/theme/skin/frontend/default/mytheme/css/colors.css.php” rel=”stylesheet” type=”text/css”>
Assume that this is a PHP file that is used as a stylesheet in a Magento extension.
Which of the following choices will make the browser apply the stylesheet?
Answers:
  1. There is no solution; a PHP file cannot be used as a stylesheet.
  2. Use the “href” attribute instead of “src” to specify the file’s location, as in: <link href=”http://siteurl.com/theme/skin/frontend/default/mytheme/css/colors.css.php” rel=”stylesheet” type=”text/css”>
  3. Call a static CSS file instead of using a PHP file as a stylesheet.
  4. Send a valid Content-Type HTTP header, as in: header(“content-type: text/css”);
33. What is the recommended way to override/extend Magento core functionality?
Answers:
  1. Directly edit the core files of Magento with proper commenting.
  2. Mage::registerOverride(‘CoreClassName’,’CoreFunctionName’,’MyClassName’,’MyFunctionname’);
  3. Copy the original Magento core file to the app/code/local folder and customize that file.
  4. Create extended versions of core files in their own folder with extension information. app/code/core/Mage/Cms/Model/Page.php app/code/core/Mage/Cms/Model/Page.1.php App/code/core/Mage/Cms/Model/Page.2.php
34. An observer in Magento is defined as a:
Answers:
  1. Method
  2. Class
  3. Event
  4. None of these.
35. What is the difference between “Flush Magento Cache” and “Flush Cache Storage” in the Magento Cache Management System?
Answers:
  1. “Flush Magento Cache” removes “/tmp/” folder’s cache only, while “Flush Cache Storage” clears everything.
  2. “Flush Cache Storage” removes “/tmp/” folder’s cache only, while “Flush Magento Cache” clears everything.
  3. “Flush Magento Cache” and “Flush Cache Storage” are equivalent; they work the same way.
  4. None of the above.
36. Which of the following will get a list of products belonging to a specific category within a view file?
Answers:
  1. $productCollection = Mage::getResourceModel(‘catalog/product_collection’) ->addCategoryFilter($category);
  2. {{block type=”catalog/product_list” category_id=”7″ template=”catalog/product/list.phtml”}}
  3. $productCollection = Mage::getResourceModel(‘catalog/product_collection’) ->addFilter($category);
  4. $productCollection = Mage::getModel(‘catalog/product_collection’) ->addCategoryFilter($category);
37. Assuming that trees must have categories as parents and products as children, and that there are no sub-categories under main categories, which of the following code samples will get the full catalog tree?
Answers:
  1. $categories = Mage::getModel(‘catalog/category’) ->getCollection(); foreach ($categories as $category) { print $category->getName(); $categoryDetails = Mage::getModel(‘catalog/category’)->load($category->getId()); $products = $categoryDetails->loadChildProducts(); foreach($products as $product){ Print $product->getName(); } }
  2. $categories = Mage::getModel(‘catalog/category’) ->getCollection(); foreach ($categories as $category) { print $category->getName(); $products = Mage::getModel(‘catalog/category’) ->load($category->getId()) ->getProductCollection(); foreach($products as $product){ Print $product->getName(); } }
  3. $categories = Mage::getModel(‘catalog/category’) ->getCollection() ->setLoadProducts(true); foreach ($categories as $category) { print $category->getName(); foreach($category->getProducts() as $product){ print $product->getName(); } }
  4. $products = Mage::getModel(‘catalog/product’) ->getCollection(); foreach ($products as $product) { print $product->getCategory()->getName(); print $product->getName(); }
38. Which of the following will call a static block inside one of Magento’s template files?
Answers:
  1. $this->setBlockId(‘my_static_block_name’)->toHtml()
  2. $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘my_static_block_name’)->toHtml()
  3. $this->createBlock(‘cms/block’)->setBlockId(‘my_static_block_name’)->toHtml()
  4. $this->getLayout()->createBlock(‘cms/block’)->BlockId(‘my_static_block_name’)->toHtml()
39. Which of the following Magento objects will be created during checkout?
Answers:
  1. sales/payment
  2. sales/tax
  3. sales/order
  4. sales/quote
40. Assuming the following choices are to be added to a custom theme layout’s local.xml file; which of the following will move the “related products” box in the “product details page” to the bottom center column?
Answers:
  1. <catalog_product_view> <reference name=”right”> <action method=”unsetChild”> <block>catalog.product.related</block> </action> </reference> <reference name=”content”> <action method=”insert”> <block>catalog.product.related</block> </action> </reference> </catalog_product_view>
  2. <catalog_product_view> <reference name=”right”> <action method=”unsetChild”> <block>catalog.product.related</block> </action> </reference> <reference name=”product.info”> <action method=”insert”> <block>catalog.product.related</block> <after>1</after> </action> </reference> </catalog_product_view>
  3. <catalog_product_view> <reference name=”right”> <action method=”unsetChild”> <block>catalog.product.related</block> </action> </reference> <reference name=”product.info”> <action method=”insert”> <block>catalog.product.related</block> <after>0</after> </action> </reference> </catalog_product_view>
  4. None of the above.
41. What is the correct method to add an external JavaScript file to Magento’s local.xml file?
Answers:
  1. <action method=”addScript”><script>jquery/jquery.js</script></action>
  2. <action method=”addCss”><script>jquery/jquery.js</script></action>
  3. <action method=”addJS”><script>jquery/jquery.js</script></action>
  4. None of the above
42. Which of the following will check whether the currently logged-in customer ever placed an order at the Magento store?
Answers:
  1. $order = Mage::getModel(‘sales/order’)->getCollection() ->addAttributeToFilter(‘customer_id’,$session->getId()) ->getFirstItem(); if ($orders->getSizeValue()) { }
  2. $orders = Mage::getResourceModel(‘sales/order_collection’) ->addFieldToSelect(‘*’) ->addFieldToFilter(‘entity_id’, $customer->getEntityId()); if ($orders->getSize()) { }
  3. $orders = Mage::getResourceModel(‘sales/order_collection’) ->addFieldToFilter(‘customer_id’, $customer->getId()); if ($orders->getValue()) { }
  4. $orders = Mage::getResourceModel(‘sales/order_collection’) ->addFieldToSelect(‘*’) ->addFieldToFilter(‘customer_id’, $customer->getId()); if ($orders->getSize()) { }
43. How can a new column be added in sales_flat_order to save a custom value in Magento?
Answers:
  1. By adding column name in Model
  2. By adding column name in Controller
  3. By adding column name in Block
  4. By defining column name in Block and table
44. Which of the following will get the order increment ID in Magento?
Answers:
  1. $order = Mage::getSingleton(‘sales/order’)->getLastOrderId(); $lastOrderId = $order->getIncrementId();
  2. $orderId = $this->getOrderId();
  3. $order = Mage::getModel(‘sales/order’); $order->load(Mage::getSingleton(‘sales/order’)->getLastOrderId()); $lastOrderId = $order->getIncrementId();
  4. None of these.
45. Which of the following will get the tax amount on a page in Magento?
Answers:
  1. Mage::helper(‘checkout’)->getQuote()->getShippingAddress()->getData(‘tax_amount’);
  2. $totalItemsInCart = Mage::helper(‘checkout/cart’)->getItemsCount(); $totals = Mage::getSingleton(‘checkout/session’)->getQuote()->getTotals(); $subtotal = round($totals[“subtotal”]->getValue()); $grandtotal = round($totals[“grand_total”]->getValue()); >if(isset($totals[‘discount’]) && $totals[‘discount’]->getValue()) { $discount = round($totals[‘discount’]->getValue()); } else { $discount = ”; } if(isset($totals[‘tax’]) && $totals[‘tax’]->getValue()) { $tax = round($totals[‘tax’]->getValue()); } else { $tax = ”; }
  3. $order = Mage::getModel(‘sales/order’)->load($order_id); $items = $order->getAllItems(); $subtotals = array(); foreach ($items as $_item) { if (array_key_exists($subtotals[$_item->getTaxClassId()])) { $subtotals[$_item->getTaxClassId()] += $_item->getRowTotal(); } else { $subtotals[$_item->getTaxClassId()] = $_item->getRowTotal(); } }
  4. <?php $order = Mage::getModel(‘sales/order’)->loadByIncrementId($this->getOrderId()); $data = $order->getData(); ?>
46. Which of the following will retrieve a list of all shipping methods in Magento?
Answers:
  1. public function toOptionArray($isMultiSelect = false) { $methods = Mage::getSingleton(‘shipping/config’)->getActiveCarriers(); $options = array(); foreach($methods as $_code => $_method) { if(!$_title = Mage::getStoreConfig(“carriers/$_code/title”)) $_title = $_code; $options[] = array(‘value’ => $_code, ‘label’ => $_title . ” ($_code)”); } if($isMultiSelect) { array_unshift($options, array(‘value’=>”, ‘label’=> Mage::helper(‘adminhtml’)->__(‘–Please Select–‘))); } return $options; }
  2. $salesQuoteRate = Mage::getModel(‘sales/quote_address_rate’)->load($rate_id); if($salesQuoteRate){ echo ‘<br/>CODE : ‘.$salesQuoteRate->getCode(); echo ‘<br/>METHOD : ‘.$salesQuoteRate->getMethod(); }
  3. $iOrderId = Mage::getSingleton(‘checkout/session’)->getLastRealOrderId(); $oOrder = Mage::getModel(‘sales/order’)->loadByIncrementId($iOrderId); echo $oOrder->getShippingMethod(); echo $oOrder->getShippingDescription();
  4. echo Mage::getSingleton(‘checkout/session’)->getQuote()->getShippingAddress()->getShippingMethod();
47. Which of the following will list all products from a particular category?
Answers:
  1. $products = Mage::getModel(‘catalog/category’)->load($category_id) ->getProductCollection() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->addAttributeToFilter(‘special_price’, array(‘neq’ => “”)) ->setOrder(‘price’, ‘ASC’) ;
  2. $productCollection = Mage::getResourceModel(‘catalog/product_collection’) ->addCategoryFilter($category);
  3. $products = Mage::get((‘catalog/category’)->load($category_id) ->getCollection() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->addAttributeToFilter(‘special_price’, array(‘neq’ => “”)) ->setOrder(‘price’, ‘ASC’) ;
  4. $products = Mage::getModel(‘catalog/category’)->load($category_id) ->getProduct() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->addFilter(‘special_price’, array(‘neq’ => “”)) ->setOrder(‘price’, ‘ASC’) ;
48. By default, Magento allows 3 themes to be loaded at any time. In what order are they loaded? (1 being first and 3 being last)
Answers:
  1. 1 Custom default theme 2 Magento base theme 3 Custom non-default theme
  2. 1 Magento base theme 2 Custom default theme 3 Custom non-default theme
  3. 1 Custom non-default theme 2 Custom default theme 3 Magento base theme
  4. None of the above
49. What is the correct method for calling a single product inside a static block?
Answers:
  1. {{block type=”media/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
  2. {{block type=”catalog/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
  3. {{block type=”all/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
  4. {{block type=”categories/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
50. Which of the following code samples will link a configurable product’s images to its constituent simple products, in the product details page?
Answers:
  1. $_parentIdArray = Mage::getModel(‘catalog/product_type_configurable’)->getParentIdsByChild($_product->getId()); if(sizeof($_parentIdArray)==1 && Mage::getModel(‘catalog/product’)->load($_parentIdArray[0])->getTypeId() == ‘configurable’){ $_product = Mage::getModel(‘catalog/product’)->load($_parentIdArray[0]); }
  2. $_childIdArray = Mage::getModel(‘catalog/product_type_configurable’)->getChildIds($_product->getId()); if(sizeof($_childIdArray)==1 && Mage::getModel(‘catalog/product’)->load($_childIdArray[0])->getTypeId() == ‘configurable’){ $_product = Mage::getModel(‘catalog/product’)->load($_childIdArray[0]); }
  3. $_parentIdArray = Mage::getModel(‘catalog/product’)->getIdsByChild($_product->getId()); if(sizeof($_parentIdArray) >= 1 && Mage::getModel(‘catalog/product’)->load($_parentIdArray[0])->getTypeId() == ‘configurable’){ $_product = Mage::getModel(‘catalog/product’)->load($_parentIdArray[0]); }
  4. $_childIdArray = Mage::getModel(‘catalog/product’)->getChildIdsByParent($_product->getId()); if(sizeof($_childIdArray)==1 && Mage::getModel(‘catalog/product’)->load($_childIdArray[0])->getTypeId() == ‘configurable’){ $_product = Mage::getModel(‘catalog/product’)->load($_childIdArray[0]); }
51. Which of the following will add a new custom block on the product details page after the media block, using a custom module?
Answers:
  1. <reference name=”product.info”> <block type=”mymodule/folder_class” name=”mymodule.folder.class” template=”mymodule/folder/class.phtml” as=”mymodule_folder_class”></block> </reference>
  2. <reference name=”product.info”> <block type=”mymodule/folder_class” after=”media” name=”mymodule.folder.class” template=”mymodule/folder/class.phtml” as=”mymodule_folder_class”></block> </reference> <?php echo $this->getChildHtml(‘mymodule_folder_class’);?>
  3. <reference name=”product.info”> <block type=”mymodule/folder_class” after=”media” name=”mymodule.folder.class” template=”mymodule/folder/class.phtml” as=”mymodule_folder_class”></block> </reference> <?php echo $this->getChildHtml(‘mymodule_class’);?>
  4. None of the above.
52. Which of the following methods can be used add a new attribute to all products?
Answers:
  1. Using XML layout files
  2. By creating a new field in the database table named ‘catalog_attributes’
  3. Via the Magento Admin panel (Manage Attributes)
  4. By creating a new module
53. Assuming a left column is going to be added, which of the following are possible values of the block type in the code below?
<block type=”” name=”left” as=”left” template=”page/html/left.phtml” />
Answers:
  1. catalog/navigation
  2. core/text_list
  3. page/template_container
  4. page/html
54. What is the difference between the isSaleable() and isAvailable() functions?
Answers:
  1. isAvailable() is used to decide whether to show an “Add to Cart” button or not, while isSaleable() is used to decide whether to display the product as “in stock” or “out of stock”.
  2. There is no difference between the two functions.
  3. isSaleable() checks if the product’s type can be sold, while isAvailable() checks if the product itself can be sold.
  4. isAvailable() is used to decide whether to display the product as “in stock” or “out of stock”, while isSaleable() is used to decide whether to show an “Add to Cart” button or not.
55. Which of the following Magento classes should be used for adding custom duties/taxes to a quote during the checkout process?
Answers:
  1. Mage_Sales_Model_Quote_Item_Option
  2. Mage_Sales_Model_Quote_Address_Total_Abstract
  3. Mage_Sales_Model_Quote_Item
  4. Mage_Sales_Model_Quote_Payment
56. Select which conditions can be checked to track down a product that is not showing in a category page.
Answers:
  1. Product visibility must be “Listed”;
  2. Product must be enabled;
  3. Stock and quantity must be greater than 0;
  4. If using multiple websites, check which website the product points to;
57. How can programmatically added bundle products be shown in Magento’s front-end?
Answers:
  1. By re-indexing
  2. By using the following codes: Mage::register(‘product’, $product); Mage::register(‘current_product’, $product); $product->setCanSaveConfigurableAttributes(false); $product->setCanSaveCustomOptions(true);
  3. By using the following: 1. setBundleOptionsData() 2. setBundleSelectionsData() 3. setCanSaveBundleSelections(true)
  4. It is not possible to show programmatically added bundle products in the front-end.
58. Which of the following is the correct method to use to check if custom options were added to a product?
Answers:
  1. $product->hasCustomType();
  2. $product->hasCustomOptions();
  3. $product->hasOptions();
  4. $product->hasOptionsType();
59. Which of the following Events are triggered when the payment has been confirmed?
Answers:
  1. checkout_onepage_controller_success_action
  2. checkout_payment_confirmed
  3. sales_order_payment_pay
  4. payment_confirmed_action
60. Which of the following statements are true regarding custom options for products in Magento?
Answers:
  1. Custom options are only stored on the quote as option IDs and values.
  2. Every time the options are rendered, they are reloaded from the database.
  3. If the values for custom options are modified, they would need to be saved, and that will set them for all users.
  4. None of these.
61. Which of the following will get a specific product attribute from its product ID without loading the whole product?
Answers:
  1. Mage::getResourceModel(‘catalog/product’)->getAttributeRawValue($productId, ‘attribute_code’, $storeId);
  2. $product->getResource()->getAttribute($attribute_code)->getFrontend()->getValue($product);
  3. $object->getData($this->getAttribute()->getAttributeCode());
  4. None of the above
62. Which of the following will display only ‘configurable’ products in a page?
Answers:
  1. $_productCollection = $this ->getLoadedProductCollection() ->addAttributeToFilter(‘type_id’,’configurable’);
  2. <?php if($_product->getTypeId() == “configurable”): ?> <?php $_configurable = $_product->getTypeInstance()->getUsedProductIds(); ?> <?php foreach ($_configurable as $_config): ?> <?php $_simpleproduct = Mage::getModel(‘catalog/product’)->load($_config); ?> <?php //Magic php with a $_simpleproduct. ?> <?php endforeach; ?> <?php endif; ?>
  3. $_productCollection = $this->getLoadedProductCollection(); foreach ($_productCollection as $_product) { if ($_product->_data[‘type_id’] == ‘configurable’) { … } }
  4. $collectionConfigurable = Mage::getResourceModel(‘catalog/product_collection’) ->addAttributeToFilter(‘type_id’, array(‘eq’ => ‘configurable’));
63. Which of the following will return the absolute path for a product image in Magento?
Answers:
  1. A) echo $_product->getImageUrl();
  2. B) echo $_product->getImagePath();
  3. C) Both A and B
  4. D) None of the above
64. Assuming that a column needs to be added under Catalog >> Manage Products in Magento, which file will need to be edited?
Answers:
  1. app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Layout.php
  2. app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Grid.php
  3. app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Design.php
  4. A custom column cannot be added under Catalog >> Manage Products.
65. Select the correct sequence of methods to use to create a bundle product in Magento.
Answers:
  1. setBundleOptionsData, setBundleSelectionsData, setCanSaveBundleSelections, setAffectBundleProductSelections
  2. setBundleOptionsData,setCanSaveBundleSelections,setBundleSelectionsData,setAffectBundleProductSelections
  3. setBundleOptionsData, setBundleSelectionsData, setAffectBundleProductSelections, saveBundleOptions
  4. setBundleOptionsData, setCanSaveBundleSelections,setSelectionCollection, setAffectBundleProductSelections
66. Which of the following code samples will display products from a certain category in random order?
Answers:
  1. $_productCollection = Mage::getResourceModel(‘catalog/product_collection’); Mage::getModel(‘catalog/layer’)->prepareProductCollection($_productCollection); $_productCollection->getSelect()->order(‘rand()’);
  2. $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort() ->addAttributeToSelect(‘*”) ->addCategoryFilter(Mage::getModel(‘catalog/category’)->load()); $products->getSelect()->order(new Zend_Db_Expr(‘RAND()’));
  3. $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort(‘id’, ‘RAND()’) ->addAttributeToSelect(‘small_image’) ->addCategoryFilter(Mage::getModel(‘catalog/category’) ->load($catId));
  4. $_productCollection = Mage::getResourceModel(‘catalog/product_collection’); Mage::getModel(‘catalog/layer’)->prepareProductCollection($_productCollection); $_productCollection->getSelect()->rand();
67. For data security and privacy reasons, Magento uses two cookies for frontend session.
All I know is that one of them is being set in Mage_Core_Model_Cookie::set(..) and the other one in Zend_Session::expireSessionCookie().
Why does Magento use the Zend_Session::expireSessionCookie()?
Answers:
  1. Because it is necessary for magento and you must use that session.
  2. Because Magento relies heavily on the Zend Framework as the underpinning and it will be able to be ignored.
  3. Because Magento relies heavily on the Zend Framework as the underpinning and I must use that for frontend session without condition.
  4. It is the vestigial code, so I was able to delete the Zend cookie without any apparent deleterious effects
68. Which of the following will add a static block on the site’s home page in Magento?
Answers:
  1. <cms_index_index> <reference name=”content”> <block type=”cms/block” name=”home-page-block”> <action method=”setBlockId”><block_id>home-page-block</block_id></action> </block> </reference> <cms_index_index>
  2. <?php $ref = new Mage_Page_Block_Html_Header(); if($ref->getIsHomePage()){ ?> <?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘Your_StaticBlock_Id’)->toHtml();?> <?php } ?>
  3. <cms_index> <reference name=”content”> <block type=”cms/block” name=”home-page-block”> <action method=”setBlockId”><block_id>home-page-block</block_id></action> </block> </reference> <cms_index>
  4. <cms_index> <reference name=”homepage”> <block type=”cms/block” name=”home-page-block”> <action method=”setBlockId”><block_id>home-page-block</block_id></action> </block> </reference> <cms_index>
69. Assuming that product images need to be imported from a product import file, which folder should the images be uploaded to, before running the import profile routine?
Answers:
  1. <MAGENTOROOT>/media/
  2. <MAGENTOROOT>/media/import/
  3. <MAGENTOROOT>/import/
  4. <MAGENTOURL>/
70. Which of the following methods will allow access to a Magento session from other sites on different subdomains?
Answers:
  1. subdomain.domain.com needs to be entered in Magento’s Admin->System->Configuration->Web->Cookie Domain, to make session cookies available to other subdomains.
  2. subdomain.domain.com needs to be entered in Magento’s app/code/core/Mage/Core/Model/Config.php file, to make session cookies available to other subdomains.
  3. Allowing access to session cookies from other subdomains is not part of Magento’s core functionality, but it can be achieved using extensions.
  4. It is not possible to access a Magento site’s cookies on a different subdomain.
71. Which of the following code samples will detect if the account being checked on the front-end is an admin account?
Answers:
  1. <?php require_once ‘app/Mage.php’; ini_set(‘display_errors’,true); Mage::setIsDeveloperMode(true); umask(0) ; Mage::app(); //get the admin session Mage::getSingleton(‘core/session’, array(‘name’=>’adminhtml’)); //verify if the user is logged in to the backend if(Mage::getSingleton(‘admin/session’)->isLoggedIn()){ echo “Admin Logged in with following details”.'<br>’; echo “Admin Username: – “.Mage::getSingleton(‘admin/session’)->getData(‘user’)->getUsername().'<br>’; echo “Admin Encrypted Password: – “.Mage::getSingleton(‘admin/session’)->getData(‘user’)->getPassword().'<br>’; } else { echo “You need to be logged in as an admin.”; } ?>
  2. <?php Mage::getSingleton(‘core/session’, array(‘name’=>’adminhtml’) ); $adminsession = Mage::getSingleton(‘admin/session’, array(‘name’=>’adminhtml’)); if($adminsession->isLoggedIn()) { echo “<br>”. “Admin Logged in”; } else { echo “<br>”. “Admin NOT logged in”; } ?>
  3. $sesId = isset($_COOKIE[‘adminhtml’]) ? $_COOKIE[‘adminhtml’] : false ; $session = false; if($sesId){ $session = Mage::getSingleton(‘core/resource_session’)->read($sesId); } $loggedIn = false; if($session) { if(stristr($session,’Mage_Admin_Model_User’)) { $loggedIn = true; } } var_dump($loggedIn);
  4. $userArray = Mage::getSingleton(‘admin/session’)->getData(); $user = Mage::getSingleton(‘admin/session’); echo $userId = $user->getUser()->getUserId(); echo $userEmail = $user->getUser()->getEmail(); echo $userFirstname = $user->getUser()->getFirstname(); echo $userLastname = $user->getUser()->getLastname(); echo $userUsername = $user->getUser()->getUsername(); echo $userPassword = $user->getUser()->getPassword();
72. Which of the following will add an external JavaScript file to a Magento page?
Answers:
  1. <reference name=”head”> <action method=”addJs”><script>folder/file.js</script></action> </reference>
  2. <action method=”addJs”> <script>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</script> </action>
  3. <action method=”Jsadd”> <script>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</script> </action>
  4. <action method=”addJs”>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</action>
73. Which of the followings magento features are related to CRM?
Answers:
  1. Newsletters
  2. Contact and Transactional Emails
  3. Poll
  4. All of above
74. Which of the following statements are true regarding passing data between a controller and a block in Magento?
Answers:
  1. It can not be done by using Magento’s MVC approach, but it can be done by emulating traditional PHP MVC behaviors.
  2. It can not be done by emulating traditional PHP MVC behaviors, but it can be done by using Magento’s MVC approach.
  3. It can be done by writing this code on a controller: Mage::transfer(‘data’, $data); and writing this in the block: $data = Mage::registry(‘data’);
  4. It can be done by writing this code on a controller: Mage::register(‘data’, $data); and writing this in the block: $data = Mage::registry(‘data’);
75. How magento contact form can be shown on a CMS page?
Answers:
  1. By using block syntax {{block type=”core/template” name=”contactForm” template=”contacts/form.phtml”}}
  2. By Using Layout Update <reference name=”content”> <block type=”core/template” name=”contactForm” template=”contacts/form.phtml”/> </reference>
  3. By Creating an Widget of Contact form and adding that widget to CMS page
  4. All of above is correct
76. Which of the following will check if the current request is for a backend page or a frontend page?
Answers:
  1. Mage::app()->getStore()->isAdmin()
  2. Mage::code()->getStore()->isAdminArea()
  3. Mage::app()->getStore()->Admin()
  4. Mage::app()->getStore()->AdminHtml()
77. Which of the following statements are correct to store Contact form data in database of magento?
A. By default Magento store the Contact form data in database
B. Need to create a custom module which store data in database by override the core contacts module
Answers:
  1. Statement A is true and Statement B is false
  2. Statement B is true and Statement A is false
  3. Both statements are true.
  4. Both statements are false.
78. What does the Capture method do in the Magento Purchase and Order Processing flow?
Answers:
  1. Sends an authorization request to the payment gateway’s API.
  2. Collects funds from the authorized transaction and puts it in the merchant’s account.
  3. Throws an exception when authorization has failed.
  4. Collects the order and makes the shipment.
79. Which file needs to change to update database when transfer a local Magento install onto live server?
Answers:
  1. app/etc/config.xml
  2. app/db/config.xml
  3. app/etc/local.xml
  4. app/code/core/db/local.xml
80. Which of the following attributes are the data member of magento Mage_Newsletter_Model_Subscriber Class?
Answers:
  1. STATUS_SUBSCRIBED
  2. STATUS_NOT_ACTIVE
  3. STATUS_UNSUBSCRIBED
  4. All the above
81. Which of the following will not increase the performance of a Magento site?
Answers:
  1. Reducing the time spent on creation of the blocks
  2. Disabling the cache in the admin panel
  3. Switching on compiler mode
  4. Using auto-optimization extensions
82. Which of the following will correctly display the current theme name in Magento?
Answers:
  1. Mage::getSingleton(‘core/design_package’)->getName();
  2. Mage::getDesignPackage()->getName();
  3. Mage::getSingleton(‘core/design_package’)->getTheme(‘frontend’);
  4. Mage::getSingleton(‘core/design_package’)->getName(‘package’);

Comments

Popular posts from this blog

English Spelling Test (U.S. Version) Upwork Answers Test 2019

1 . Complete the following sentence by choosing the correct spelling of the missing word. Their relationship was plagued by _______ problems. Perpetual   —- it means: continuing for ever in the same way, often repeated Perpechual Purpetual Perptual 2.  Complete the following sentence by choosing the correct spelling of the missing word. The crowd _________ me on my acceptance into Mensa Congradulated Congrachulated Congratulated  —- it mean: to praise someone Congratilated English Spelling Test (U.S. Version) Answer;Upwork English test answer; Upwork English test answer 2017; lastest Upwork English test answer; upwork test answer;  3. Choose the correct spelling of the word from the options below. Goverment Governmant Government  — the group of people who officially control a country Govermant 4. Choose the correct spelling of the word from the options below. Temperamental  — (of a person) liable to unreasonable changes of mood Tempermental T

Office Skills Test Upwork Test Answers 2019

Question:* Your computer is not printing and a technician is not available, so you perform the following activities to investigate the problem. In which order should you take these up? 1 See if the printer cartridge is finished 2 See if the printer is switched on 3 Try to print a test page using the printer self-test 4 Try to print a test page from Windows 5 See if the printer is properly attached to the computer Answer: • 2,3,1,5,4 Question:* What is 'flexi-time'? Answer: • The flexible use of personal office hours, such as working an hour earlier one day, in order to leave an hour earlier another day. Question:* Which of the following are proven methods of improving your office skills? Answer: • All of the above Question:* When replying to an e-mail, who do you place in the cc: line and who in the bcc: line? Answer: • A person you wish to openly inform goes in the cc: line, and the person you wish to read the e-mail without the knowledge of the rec

Computer Aptitude Test Answers Upwork 2019

1. HGFE is related to ZYXW in the same way as PONM is related to: Answers:   • JKEF • TSRQ • QTSR • EDOQ 2. Refer to the diagram. From the 4 given options, choose the one that completes the series. Answers:   • 1 • 2 • 3 • 4 3. Ronald is taller than George, who is shorter than Bill. George is taller than Jimmy and Hillary, where Hillary is the shortest. Who is the tallest among all? Answers:   • Ronald • Bill • George • Jimmy • Cannot be determined 4. If 123 means "Very hot day", 356 means "hot filtered coffee" and 289 means "day and night", the numeral that stands for "very" is: Answers:   • 5 • 2 • 1 • 9 5. Bodyguard is related to person in the same way as: Answers:   • Teacher : School • Mayor : City • Soldier : Country • Monk : Temple 6. A solid cube is painted green on two adjacent sides and black on the sides opposite to the green sides and yellow on the remaining