Хотите пройти тесты на Upwork на хороший результат?
Подавайте заявку и мы поможем Вам это сделать!

Do You want to pass tests on Upwork with good scores?
Leave the request and we will help You to do that!

Magento Test 2018

Мы не гарантируем правильность всех предоставленных ответов.


190 Test Questions:

1. Which of the following will get a specific product attribute from its product ID without loading the whole product?

Answers:

• Mage::getResourceModel(‘catalog/product’)->getAttributeRawValue($productId, ‘attribute_code’, $storeId);
• $product->getResource()->getAttribute($attribute_code)->getFrontend()->getValue($product);
• $object->getData($this->getAttribute()->getAttributeCode());
• None of the above

2. Which of the following will display only ‘configurable’ products in a page?

Answers:

• $_productCollection = $this ->getLoadedProductCollection() ->addAttributeToFilter(‘type_id’,’configurable’);
• <?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; ?>
• $_productCollection = $this->getLoadedProductCollection(); foreach ($_productCollection as $_product) { if ($_product->_data[‘type_id’] == ‘configurable’) { … } }
• $collectionConfigurable = Mage::getResourceModel(‘catalog/product_collection’) ->addAttributeToFilter(‘type_id’, array(‘eq’ => ‘configurable’));

3. Which of the following will return the absolute path for a product image in Magento?

Answers:

• echo $_product->getImageUrl();
• echo $_product->getImagePath();
• Both A and B
• None of the above

4. Assuming that a column needs to be added under Catalog >> Manage Products in Magento, which file will need to be edited?

Answers:

• app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Layout.php
• app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Grid.php
• app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Design.php
• A custom column cannot be added under Catalog >> Manage Products.

5. Select the correct sequence of methods to use to create a bundle product in Magento.

Answers:

• setBundleOptionsData, setBundleSelectionsData, setCanSaveBundleSelections, setAffectBundleProductSelections
• setBundleOptionsData,setCanSaveBundleSelections,setBundleSelectionsData,setAffectBundleProductSelections
• setBundleOptionsData, setBundleSelectionsData, setAffectBundleProductSelections, saveBundleOptions
• setBundleOptionsData, setCanSaveBundleSelections,setSelectionCollection, setAffectBundleProductSelections

6. Which of the following code samples will display products from a certain category in random order?

Answers:

• $_productCollection = Mage::getResourceModel(‘catalog/product_collection’); Mage::getModel(‘catalog/layer’)->prepareProductCollection($_productCollection); $_productCollection->getSelect()->order(‘rand()’);
• $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort() ->addAttributeToSelect(‘*”) ->addCategoryFilter(Mage::getModel(‘catalog/category’)->load()); $products->getSelect()->order(new Zend_Db_Expr(‘RAND()’));
• $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort(‘id’, ‘RAND()’) ->addAttributeToSelect(‘small_image’) ->addCategoryFilter(Mage::getModel(‘catalog/category’) ->load($catId));
• $_productCollection = Mage::getResourceModel(‘catalog/product_collection’); Mage::getModel(‘catalog/layer’)->prepareProductCollection($_productCollection); $_productCollection->getSelect()->rand();

7. 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:

• Because it is necessary for magento and you must use that session.
• Because Magento relies heavily on the Zend Framework as the underpinning and it will be able to be ignored.
• Because Magento relies heavily on the Zend Framework as the underpinning and I must use that for frontend session without condition.
• It is the vestigial code, so I was able to delete the Zend cookie without any apparent deleterious effects

8. Which of the following will add a static block on the site’s home page in Magento?

Answers:

• <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>
• <?php $ref = new Mage_Page_Block_Html_Header(); if($ref->getIsHomePage()){ ?> <?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘Your_StaticBlock_Id’)->toHtml();?> <?php } ?>
• <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>
• <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>

9. 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:

• <MAGENTOROOT>/media/
• <MAGENTOROOT>/media/import/
• <MAGENTOROOT>/import/
• <MAGENTOURL>/

10. Which of the following methods will allow access to a Magento session from other sites on different subdomains?

Answers:

• subdomain.domain.com needs to be entered in Magento’s Admin->System->Configuration->Web->Cookie Domain, to make session cookies available to other subdomains.
• 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.
• Allowing access to session cookies from other subdomains is not part of Magento’s core functionality, but it can be achieved using extensions.
• It is not possible to access a Magento site’s cookies on a different subdomain.

11. Which of the following code samples will detect if the account being checked on the front-end is an admin account?

Answers:

• <?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.”; } ?>
• <?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”; } ?>
• $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);
• $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();

12. Which of the following will add an external JavaScript file to a Magento page?

Answers:

• <reference name=”head”> <action method=”addJs”><script>folder/file.js</script></action> </reference>
• <action method=”addJs”> <script>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</script> </action>
• <action method=”Jsadd”> <script>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</script> </action>
• <action method=”addJs”>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</action>

13. Which of the followings magento features are related to CRM?

Answers:

• Newsletters
• Contact and Transactional Emails
• Poll
• All of above

14. Which of the following statements are true regarding passing data between a controller and a block in Magento?

Answers:

• It can not be done by using Magento’s MVC approach, but it can be done by emulating traditional PHP MVC behaviors.
• It can not be done by emulating traditional PHP MVC behaviors, but it can be done by using Magento’s MVC approach.
• 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’);
• 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’);

15. How magento contact form can be shown on a CMS page?

Answers:

• By using block syntax {{block type=”core/template” name=”contactForm” template=”contacts/form.phtml”}}
• By Using Layout Update <reference name=”content”> <block type=”core/template” name=”contactForm” template=”contacts/form.phtml”/> </reference>
• By Creating an Widget of Contact form and adding that widget to CMS page
• All of above is correct

16. Which of the following will check if the current request is for a backend page or a frontend page?

Answers:

• Mage::app()->getStore()->isAdmin()
• Mage::code()->getStore()->isAdminArea()
• Mage::app()->getStore()->Admin()
• Mage::app()->getStore()->AdminHtml()

17. 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:

• Statement A is true and Statement B is false
• Statement B is true and Statement A is false
• Both statements are true.
• Both statements are false.

18. What does the Capture method do in the Magento Purchase and Order Processing flow?

Answers:

• Sends an authorization request to the payment gateway’s API.
• Collects funds from the authorized transaction and puts it in the merchant’s account.
• Throws an exception when authorization has failed.
• Collects the order and makes the shipment.

19. Which file needs to change to update database when transfer a local Magento install onto live server?

Answers:

• app/etc/config.xml
• app/db/config.xml
• app/etc/local.xml
• app/code/core/db/local.xml

20. Which of the following attributes are the data member of magento Mage_Newsletter_Model_Subscriber Class?

Answers:

• STATUS_SUBSCRIBED
• STATUS_NOT_ACTIVE
• STATUS_UNSUBSCRIBED
• All the above

21. Which of the following will not increase the performance of a Magento site?

Answers:

• Reducing the time spent on creation of the blocks
• Disabling the cache in the admin panel
• Switching on compiler mode
• Using auto-optimization extensions

22. Which of the following will correctly display the current theme name in Magento?

Answers:

• Mage::getSingleton(‘core/design_package’)->getName();
• Mage::getDesignPackage()->getName();
• Mage::getSingleton(‘core/design_package’)->getTheme(‘frontend’);
• Mage::getSingleton(‘core/design_package’)->getName(‘package’);

23. Which statement correctly describes order state and order status?

Answers:

• State and status are independent properties of the order.
• An order doesn’t have a status, only a state. Status is a property of an invoice, shipment, and credit memo.
• State represents the general state of the order, while status works on item level.
• The status is a child of the state.

24. Which of the following will display a customer’s TAX/VAT number?

Answers:

• $taxvat = $order[‘customer_taxvat’];
• $order->getData(‘customer_taxvat’);
• $order->getQuote()->getCustomerTaxvat();
• $order->getData()->getCustomerTaxvat();

25. Why does the error, “front controller reached 100 router match iterations”, occur?

Answers:

• There is an error in the code.
• Some modules failed to load.
• Router references were set incorrectly.
• .htacces is blocking URLs.

26. How many code pools does Magento has?

Answers:

• 1
• 2
• 3
• 4

27. Which of the following step is going to instantiate a product collection?

Answers:

• $collection = Mage::getModel(‘catalog/product’)->getProduct();
• $collection = Mage::getModel(‘catalog/product’)->getCollection();
• $collection = Mage::getModel({‘catalog/product’})->getCollection();
• $collection = Mage::getModel(‘catalog/product’)—>getCollectionId();

28. Which of the following snippet of codes can be used to get the latest n products?

Answers:

• $collection = Mage::getModel(‘catalog/product’)->getCollection();
$collection->getSelect()->order(‘entity_id desc’)->limit(n);
• $collection = Mage::getModel(‘catalog/product’)->getCollection();
$collection->getSelect()->orderBy(‘entity_id desc’)->limit(n);
• $collection = Mage::getModel(‘catalog/products’)->getCollections();
$collection->getSelect()->orderBy(‘entity_id desc’)->limit(n);
• None of the above

29. Page layout files are useful in ___ front pages of Magento.

Answers:

• php
• rendering
• file
• component

30. Which of the following code to include CMS block in template file(.phtml)?

Answers:

• echo $this->getLayout()->createBlock(‘cms/block’)->setBlockhtml(‘static_block_id’)->toHTML();
• echo $this->getLayout()->createBlockHTML(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();
• echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static_block_id’)->toPHTML();
• echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();

31. Factories are special objects that have this purpose:

Answers:

• to create an instance of one non-injectable class or interface
• to create an instance of one non-injectable class or object
• to create an instance of one non-injectable class or function
• None of the above

32. Layered navigation gives users customized browsing options when viewing products by categories. Users can now _____ products by price, size, color, and other customizable attributes.

Answers:

• sort
• handle
• index
• quantity

33. Add another attribute to Magento products.

Answers:

• It sounds like you’d have to create new Attributes Sets for your customers/uploaders to work with.
• A good thing in general is to use different attributes sets depending on the type of products you’re dealing with; but in your case you could as well store and display customer data (in that case the uploader of the product?) in attributes, attached to a new Attribute Set that gathers everything you need.
• You can basically customize the whole backend for products via Attributes Sets. You’ll find them in the Catalog > Attributes menu. Should be the easiest way to go. Then you can match your extension to work with those.
• All of the above

34. What happens when you edit an existing order using the order management page?

Answers:

• Depending on the order status, different editing forms appear for the current order
• The current order is canceled and a new order is created from scratch based on the current order’s data.
• It will work well and let me edit the order
• A form appears that allows you to edit shopping information for the current order only

35. How to create custom adminhtml theme magento.

Answers:

• <?xml version=»1.0″?>
<config>
<modules>
<Foo_myTheme>
<version>0.0.1</version>
</Foo_myTheme>
</modules>
<stores>
<admin>
<design>
<package>
<name>default</name>
</package>
<theme>
<template>myTheme</template>
<skin>myTheme</skin>
<layout>myTheme</layout>
</theme>
</design>
</admin>
</stores>
</config>

• <?xml version=»1.0″ encoding=»UTF-8″?>
<config>
<stores>
<admin>
<design>
<package>
<name>default</name>
</package>
<theme>
<default>myTheme</default>
</theme>
</design>
</admin>
</stores>
</config>

• Both of the above
• None

36. Is it possible to install magento in a local server and access it in to another system in the same network.

Answers:

• Yes
• No

37. Who accesses the service layer?

Answers:

• Controllers (initiated by actions of users of the storefront)
• Web services (SOAP and REST API calls)
• Magento modules through service contracts
• All of the above

38. Which of the following is not a module in Magento?

Answers:

• Core
• Community
• Commercial
• None of the above

39. Which of the following files are required for all components?

Answers:

• registration.php, composer.json
• composer.json, index.php
• registration.php, config.xml
• registration.php, composer.json, config.xml

40. Which of the following aspects to the define RESTful API?
Note: There may be more than one right answer.

Answers:

• 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

41. Which of the following tasks can be performed by Command Line Interface?

Answers:

• Installing Magento
• Clearing the cache
• Managing indexes, including reindexing
• Creating translation dictionaries and translation packages
• All of the above

42. Which PHP framework does Magento uses?

Answers:

• Yii
• Symfony
• Zend
• Lavarel

43. Many webhosts provide automatic installations. This allows you to install Magento with a few simple clicks. While it is important to understand the installation process, an automatic installation can save time. Contact your web site host to find out if they support automatic installations. If they do not, Magento must be installed manually.

Answers:

• Automatic Install
• Manually Install
• Save Install
• All of the above

44. Using the following command you can reset for Magento file and Directory permissions?

Answers:

• find . –type f –exec chmod 755 {} ;
find . –type d –exec chmod 644 {};
chmod x mage

• find –type f –exec chmod 644 {} \;
find –type d –exec chmod 755 {} \;
chmod +x merge

• find . –type f –exec chmod 755 {} ;
find . –type d –exec chmod 644 {} ;
chmod x mage

• find . –type f –exec chmod 644 {} \;
find . –type d –exec chmod 755 {} \;
chmod +x mage

45. What is the difference between subtotal price and base subtotal?

Answers:

• Base subtotal is in the customers currency and Subtotal is in your shop’s base currency
• Subtotal in the customer’s currency and BaseSubtotal is in your shop’s base currency
• Subtotal includes taxes, base subtotal does not
• Nothing special, it’s the same value

46. A gift registry will hold the following informations?
Note: There may be more than one right answer.

Answers:

• List of products
• Event location
• Event name
• Event id

47. Who ordered what in Magento webshop with a query on db?

Answers:

• SELECT e.*, sfoi.*, sfoa.lastname, sfoa.email, sfoa.street, sfoa.postcode, sfoa.country_id
FROM sales_flat_order e
INNER JOIN sales_flat_order_item sfoi ON (e.entity_id=sfoi.order_id)
INNER JOIN sales_flat_order_address sfoa ON (e.entity_id=sfoa.parent_id)
WHERE date_format(e.created_at, ‘%Y’) LIKE ‘2015’
AND sfoi.parent_item_id IS NULL
AND sfoi.qty_ordered > 0;

• SELECT e.*, sfoi.*, sfoa.lastname, sfoa.email, sfoa.street, sfoa.postcode, sfoa.country_id
FROM sales_flat_order e
INNER JOIN sales_flat_order_item sfoi ON (e.entity_id=sfoi.order_id)
INNER JOIN sales_flat_order_address sfoa off (e.entity_id=sfoa.parent_id)
WHERE date_format(e.created_at, ‘%Y’) LIKE ‘2015’
AND sfoi.parent_item_id IS NULL
AND sfoi.qty_ordered > 0;

• SELECT e.*, sfoi.*, sfoa.lastname, sfoa.email, sfoa.street, sfoa.postcode, sfoa.country_id
FROM sales_flat_order e
INNER JOIN sales_flat_order_item sfoi ON (e.entity_id=sfoi.orders_id)
INNER JOIN sales_flat_order_address sfoa ON (e.customer_id=sfoa.customer_id)
WHERE date_format(e.created_at, ‘%Y’) LIKE ‘2015’
AND sfoi.parent_item_id IS NULL
AND sfoi.qty_ordered > 0;

• All of the above

48. Magento has the following codepool?

Answers:

• Community, Advanced and Local
• Core, Community and Local
• Remote, Core and Community
• None of the above.

49. Which of the following code to specify JavaScript resources mapping?

Answers:

• var config = {
paths: {
// configuration for resource ‘app/code/Magento/Catalog/model/frontend/product/product.js’
«product»: «./product/product»
}
};

• var config = {
paths: {
// configuration for resource ‘app/code/Magento/Catalog/view/frontend/product/product.js’
«product»: «./product/product»
}
};

• var config = {
paths: {
// configuration for resource ‘app/code/Magento/Catalog/controller/frontend/product/product.js’
«product»: «./product/product»
}
};

• var config = {
paths: {
// configuration for resource ‘app/code/Magento/Catalog/js/frontend/product/product.js’
«product»: «./product/product»
}
};

50. Polls are used to get customer’s _____ and preferences?

Answers:

• results
• opinions
• response
• feedback

51. How do place Magento theme blocks?

Answers:

• {{block type=’bannerslider/bannerslider’ template=’bannerslider/bannerslider.phtml’}}
• All of the above
• $block = $this->getLayout()->getBlock(‘core/template’)
• {{block type=’foo/bar’ template=’default/default/easycatalogimg.home.phtml’}}

52. Which of the following will log current collection’s SQL query?
Note: There may be more than one right answer.

Answers:

• $collection->printLogQuery(true);
• $collection->getSelect()->__toString();
• $collection->printLogQuery();
• $collection->getSelected()->__toString();

53. What function fits in this code snippet?
class Namespace_Module_Block_Content extends Mage_Core_Block_Template {
protected function _construct() {
parent::_construct();
$this->[function] (‘namespace/module/content.phtml’);
}
}

Answers:

• setTemplate
• setView
• setViewFile
• setLayout

54. Which magento command is used to display the current deployment mode?

Answers:

• magento deploy:mode
• magento mode:show
• magento deploy:mode:show
• None of the above

55. You want to display your custom attribute value on the product list, which actions should you perform to make it possible?

Answers:

• Set «used_in_product_listing» property for this attribute to «1».
• Rewrite the method Mage_Catalog_Block_Product_List::_getProductCollection() to add additional attributes to select.
• Observe the «catalog_product_collection_load_before» event to add the attribute to select.
• You can use «used_in_product_list» property for this attribute to «0».

56. What does the following tag means in module’s config.xml file?
<sallowspecific>0</sallowspecific>

Answers:

• allow all available countires
• allow all countries specified in the country list
• shipping not allowed
• None of the above

57. Magento Redirect all .htaccess keeping administration.

Answers:

• RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index\.php/admin [NC]
RewriteRule ^ — [L]
RewriteCond %{THE_REQUEST} !/new/ [NC]
RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L]
• RewriteEngine On
RewriteCond %{THE_REQUEST} !/new/ [NC]
RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L]
• Both of the above

58. What is XML-RPC?
Note: There may be more than one right answer.

Answers:

• XML-RPC is a remote procedure call (RPC) protocol
• XML-RPC is a remote procedure call (SOAP) API
• XML to encode its calls and HTTP as a transport mechanism

59. Static __ is a silent function of a class, which is stored in the memory space of a class (not objects)

Answers:

• variable
• function
• page
• method

60. Which of the following is the entry area for Magento Admin?

Answers:

• index.php
• default.php
• frontend.php
• None of the above

61. How do you change an order status to complete?

Answers:

• Directly in the database
• By clicking Complete button
• You need to create shipping for order
• You need to create an invoice and shipping

62. A SOAP request is basically an HTTP POST request containing a SOAP ____ a ____ and a ____?

Answers:

• javascript, header , body
• envelope, header , document
• envelope, body , document
• envelope, header , body

63. Which of the following command you can use to clear the directories?

Answers:

• 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/*

64. Magento Override Shipping Methods.

Answers:

• In this open etc/config.xml file and find appropriate model for it. In the model file you will find default methods attached to the carrier.
• All of the above
• If it’s been overridden, then the simplest way to find it is by a doing file search in your magento directory by «flat rate» or «free shipping».
• However your other shipping carrier and methods like fedex, ups, usps etc are defined in app/code/core/Mage/Usa.
• Your default shipping method flat rate and free shipping are defined in app/code/core/Mage/Shipping.

65. If module A declares a dependency upon Module B, which of the following is not valid to declare such dependency?

Answers:

• 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.

66. The term static view file refers to the following:

Answers:

• “Static” means it can be cached for a site (that is, the file is not dynamically generated). Examples include images and CSS generated from LESS.
• “View” refers to presentation layer (from MVC).
• Both of the above
• None of the above

67. Which of the following is required for installing Magento?

Answers:

• Linux x86-64
• Apache
• MySQL
• PHP
• All of the above.

68. Which of the following is not a Magento module?

Answers:

• Core Modules
• Community Modules
• Commercial Modules
• Complex Modules

69. What is the file format for a data upgrade script?

Answers:

• {$module}-v2.php
• install-data-v2-{$module}.php
• upgrade-0.0.2.php
• data-upgrade-0.0.1-0.0.2.php

70. Adding Text and fields to the order fulfillment/invoice email or forwarding customer-facing email.

Answers:

• There is a setting in the Magento Admin Panel: System > Configuration > Sales > Sales Email that allows you to add comma-separated email addresses. Still would like to be able to edit the invoice email the client is receiving to have all the items ordered displayed.
• There is a setting in the Magento Admin Panel: System > Configuration > Item > Items Email that allows you to add comma-separated email addresses. Still would like to be able to edit the invoice email the client is receiving to have all the items ordered displayed.
• There is a setting in the Magento Admin Panel: System > Configuration > Shipping > Shipping Email that allows you to add comma-separated email addresses. Still would like to be able to edit the invoice email the client is receiving to have all the items ordered displayed.
• All of the above

71. Which of the following is not a Magento cache type?

Answers:

• Configuration
• Page cache
• Entity attribute value (EAV)
• DML
• DDL

72. Which of the following are the methods of PayPal Payment Gateways?
Note: There may be more than one right answer.

Answers:

• Payflow Pro (Includes Express Checkout)
• Payflow Link (Includes Express Checkout)
• Payflow Add (Includes Express Checkout)
• Payflow List (Includes Express Checkout)

73. Which of the following piece of codes can be used to get Magento clients by payment method?

Answers:

• $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();
}

• $collection = Mage::getResourceModel(‘sales/order_payment_collection’)->addFieldToSelect(‘*’);
foreach ($collection as $method) {
if ($method->getMethod() == «mundipagg_boleto») {
print $method->getMethod().»<br>»;
}
}

• $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>»;
}
}

• All of the above

74. Which of the following will return the current page title in Magento?

Answers:

• $this->getLayout()->get(‘head’)->getTitle();
• $this->getLayout()->getBlock(‘head’)->getPageTitle();
• $this->getLayout()->get(‘Title’)->getHead();
• $this->getLayout()->getBlock(‘head’)->getTitle();

75. Where are dynamic view files located in a theme directory?

Answers:

• <theme_dir>
├── media/
├── web
│ ├── css/ (except the «source» sub-directory)
│ ├── fonts/
│ ├── images/
│ ├── js/

• <theme_dir>/
├── <Vendor>_<Module>/
│ ├── layout/
│ │ ├── override/
│ ├── templates/
├── etc/
├── web/
│ ├── css/
│ │ ├── source/
│ ├── fonts/
│ ├── images/
│ ├── js/
├── composer.json
├── registration.php
├── theme.xml

• <theme_dir>/
├── Magento_<module>/
│ ├── web/
│ │ ├── css/
│ │ │ ├── source/
│ ├── layout/
│ │ ├── override/
│ ├── templates/
├── web/
│ ├── css/
│ │ ├── source/

• <theme_dir>/
├── <Vendor>_<Module>/
│ ├── web/
│ │ ├── css/
│ │ │ ├── source/
│ ├── layout/
│ │ ├── override/
│ ├── templates/
├── etc/
├── i18n/
├── media/
├── web/
│ ├── css/
│ │ ├── source/
│ ├── fonts/
│ ├── images/
│ ├── js/

76. Is it possible to retrieve all the models’ ids based on collection filters without loading the collection itself?

Answers:

• You can use getSelect() to retrieve the current collection db select with all the filters applied. You can just tweak it by resetting the columns part and specifying the model’s id field instead
• Yes, you can use getAllIds() that will return all model id field values
• Yes, you can use getModelIds() that will return all model id field values
• No, it is impossible

77. Which of the following are inappropriate dependencies?

Answers:

• Circular dependencies (both direct and indirect)
• Undeclared dependencies
• Incorrect dependencies
• All of the above

78. Which of the following will get all active CMS pages in Magento?

Answers:

• $collection = Mage::getModel(‘cms/page’)->getCollection()->getSelect()->where(‘is_active = 1’);
• $collection = Mage::getModel(‘cms/page’)->getCollection()->addFilter(‘active’,true);
• Mage::getModel(‘cms/page’)->getActivePages();
• Mage::getModel(‘cms/page’)->getPageCollection()->setFilter(‘active’,true);

79. Which interface is not provided by service contracts?

Answers:

• Repository interfaces
• Model interfaces
• Management interfaces
• Metadata interfaces

80. Which of the following files does Magento use to detect maintenance mode?

Answers:

• var/.maintenance.flag
• var/.maintenance.mg
• var/.maintenance
• None of the above

81. How can you get Magento extension to run javascript when an item is added to the cart?

Answers:

• <checkout_cart_product_add_after>
<reference name=»footer»>
<block type=»core/templates» name=»INSERT_CUSTOM_NAME_HERE» template=»path/to/your/phtml/file.phtml» />
</reference>
</checkout_cart_product_add_after>

• <catalog_product_view>
<reference name=»footer»>
<block type=»core/template» name=»INSERT_CUSTOM_NAME_HERE» template=»path/to/your/phtml/file.phtml» />
</reference>
</catalog_product_view>

• <checkout_cart_product_add_after>
<reference name=»footer»>
<block type=»core/template» name=»INSERT_CUSTOM_NAME_HERE» template=»path/to/your/phtml/file.phtml» />
</reference>
</checkout_cart_product_add_after>

• All of the above

82. Which of the following are existing entities in Magento EAV?
Note: There may be more than one right answer.

Answers:

• Customer
• Products
• Orders
• Clients
• Shipments

83. What are the advantages of Magento?

Answers:

• It is user friendly E-commerce software.
• It is compatible with Smartphone’s, tablets and other mobile devices.
• It provides multiple payment options so every visitor can make payments based on their preferred payment gateway.
• It has many extensions which supports development of an online store.
• All of the above

84. Which of the following is not valid for service layer?

Answers:

• Resides below the domain layer and above the presentation layer.
• Contains service contracts, which define how the implementation will behave.
• Provides an easy way to access the REST/SOAP API framework code.
• Provides a stable API for other modules to call into.

85. How do you setup a Magento multilingual store?

Answers:

• Change the text with JavaScript
• Change language in htaccess file
• Create a new store view and change its language
• Do a manual switch in code

86. Name the product types that are available in Magento?

Answers:

• Simple Products, Grouped Products
• Configurable Products, Virtual Products
• Bundled Products, Downloadable Products
• All of the above

87. What function is the equal of the php’s unset to a Varien_Object?

Answers:

• unset($param)
• uns{$param}()
• remove($param)
• unregister($param)

88. 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

Answers:

• Yes
• It should be, Magento/BundleStaging/view/adminhtml/ui_component/bundle_update_product_listing.xml
• No, it should be Magento/BundleStaging/controller/adminhtml/ui_component/bundle_update_product_listing.xml
• None of the above

89. When we are using .htaccess, how can you redirect all admin pages in Magento to another domain and subdirectory?

Answers:

• RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_URI} !admin
RewriteCond %{REQUEST_URI} !index.php [NC]
RewriteRule ^ http://www.example.com/landing [R=302,L]

• RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index\.php/admin [NC]
RewriteRule ^ — [L]
RewriteCond %{THE_REQUEST} !/new/ [NC]
RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L]

• RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index\.php/admin [NC]
RewriteRule ^ — [L]
RewriteCond %{THE_REQUEST} !/new/ [NC]
RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L]

• All of the above

90. How do you forward to a specific external URL outside Magento from your controller?

Answers:

• _forward ($url)
• _redirectUrl ($url)
• rewriteUrl($url)
• goto($url)

91. Which relationship is not possible between two modules?

Answers:

• uses
• reacts to
• customizes
• moves
• replaces

92. Which of the following GET parameter is used for «not equal to» filtering?

Answers:

• neq
• in
• nin
• None of the above

93. 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();

Answers:

• 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.

94. The data model is based on the Entity-attribute-value _____ that stores data objects in tree structures?

Answers:

• rendering
• model
• class
• modal

95. Which layer holds the business logic layer of a Magento module?

Answers:

• Presentation Layer
• Service Layer
• Domain Layer
• Persistance Layer

96. When you want to change the behavior of the Magento core modules, which of the following method is acceptable?

Answers:

• Patching the core files.
• Overriding a class by XML rewrite.
• Move core modules into local directory and apply your changes.
• Overriding a class by copying the core file to a local directory.

97. Which of the following PHP extensions are required for installing Magento?

Answers:

• curl
• intl
• mhash
• PDO/MySQL
• All of the above.

98. Which statement is correct regarding Theme’s registration.php file?

Answers:

• It contains the basic meta-information, like the theme name and the parent theme name, and the theme is inherited from an existing theme.
• It is required to register your theme in the system.
• This file is optional.
• Describes the theme dependencies and some meta-information.

99. Magento looks for configuration information for each module in that module’s /etc directory. Depending on the needs of your module, you might have the following configuration files at the top level of your module’s /etc directory?

Answers:

• data.xml, config.xml, di.xml, class.xml, webapi.xml
• run.xml, config.xml, dt.xml, module.xml, settings.xml
• acl.xml, config.xml, di.xml, module.xml, webapi.xml
• acl.xml, options.xml, mod.xml, web.xml, api.xml

100. How can you disable a Magento Extension if you don’t have access to admin section?

Answers:

• Change the <active> tag’s value from true to false in module control file in app/etc/modules
• Change the <active> tag’s value from true to false in module control file in doc root of Magento
• Both of the above
• None of the above

101. Which of the following is not a Magento product type?

Answers:

• Simple Product
• Complex Product
• Grouped Product
• Configurable Product
• Virtual Product

102. Which of the following products do not have a physical presence, and are typically used for such things as services, warranties and subscriptions?

Answers:

• Simple Product
• Grouped Product
• Virtual Product
• Bundle Product

103. Which command runs Magento cron jobs?

Answers:

• magento cron
• magento cron:run
• magento run
• None of the above

104. Which of the following code snippets changes the position of the compare products block in the right column?

Answers:

• <reference 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>1</after>
</action>
</reference>

• <reference name=»right»>
<action method=»move»>
<block>catalog.compare.sidebar</block>
<sublingName>right.permanent.callout</sublingName>
<after>1</after>
</action>
</reference>

• <action method=»move» block=»right»>
<block>catalog.compare.sidebar</block>
<sublingName>right.permanent.callout</sublingName>
<after>1</after>
</action>

• <action method=»copy» block=»right»>
<block>catalog.compare.sidebar</block>
<sublingName>right.permanent.callout</sublingName>
<after>1</after>
</action>
<action method=»remove» block=»right»>
<block>catalog.compare.sidebar</block>
</action>

105. Which code is used to get the Total Price of items currently in the cart?

Answers:

• helper(‘checkout’)->formatPrice(Mage::getSingleton(‘checkout/cart’)->getPrice()->getGrandTotal()); ?>
• helper(‘checkout’)->formatPrice(Mage::getSingleton({‘checkout/cart’})->getQuotes()->getGrandTotal()); ?>
• helper(‘checkout’)->formatPrice(Mage::getSingleton(‘checkout/cart’)->getQuote()->getGrandTotal()); ?>
• helper(‘checkout’)->formatPrices(Mage::getSingletons(‘checkout/cart’)->getQuote()->getGrandTotal()); ?>

106. What step during the layout loading is the node processed?

Answers:

• After the generation of layout blocks
• Before the generation of layout update XML, but after the generation of layout blocks
• Before the generation of layout blocks, but after the generation of layout XML
• After the generation of layout blocks, but before rendering the page

107. What is required for Installing Magento Extensions on a Custom Theme?

Answers:

• <current theme package> —> <current theme folder>
• <current theme package> —> <default folder in current theme’s package>
• base —> default folder
• All of the above

108. What is the difference between Mage::getSingleton() and Mage::getModel() in Magento?

Answers:

• Mage::getSingleton() always finds for an existing object if not then it will create a new object but Mage::getModel() always creates a new object
• Mage::getSingleton() always creates a new object but Mage::getModel() always finds for an existing object if not then create a new object
• There is no difference
• None of the above

109. Which of the following are components of a Magento module?

Answers:

• libraries
• language packages
• themes
• All of the above

110. The controller action _____ method is called each time before calling the action method itself?

Answers:

• preDispatch
• preAction
• beforeDispatch
• beforeAction

111. Which endpoint is used for user authorization(Customer)?

Answers:

• ./oauth/initiate
• ./oauth/authorize
• ./admin/oauth_authorize
• ./oauth/token

112. Which endpoint is used for user authorization(Admin)?

Answers:

• ./oauth/initiate
• ./oauth/authorize
• ./admin/oauth_authorize
• ./oauth/token

113. Which of the following is not true about flat catalog?

Answers:

• A flat catalog creates new tables on the fly
• A flat catalog is updated manually
• Flat catalog indexing also applies to catalog and shopping cart price rules
• None of the above

114. Who uses the presentation layer?

Answers:

• Web users
• System administrators
• Web API calls
• All of the above

115. What model property is responsible for the naming of this event: «catalog_product_after_load»?

Answers:

• $_eventName property
• $_eventDataKey property
• $_eventObject property
• $_eventPrefix property

116. Which of the routes define the HTTP route for the web API method?
Note: There may be more than one right answer.

Answers:

• method
• class
• secure
• All of the above

117. Which of the following specifies the PHP class to use for the interface Magento\Customer\Api\CustomerRepositoryInterface?

Answers:

• di.xml
• config.xml
• custom.xml
• None of the above

118. We need to make the following actions in order to create a module with one payment method that will?
accept credit card information
authorize it when an order is submitted
save the transaction ID in order payment record

Answers:

• Module declaration, module configuration, adapter model, declaring configuration options for admin panel, database updates
• Module declaration, module validation, module configuration, declaring configuration options for admin panel, database updates
• Module declaration, module validation, module configuration, adapter model, declare configuration options for admin panel, database updates
• Configuration options from admin panel

119. Which theme file defines the location information in Magento 2.0?

Answers:

• signup.php
• registration.php
• new.php
• frontend.php

120. Which function can be used to get the image Width and Height?

Answers:

• Imagesx() , Imagesy()
• getWidth() , getHeight()
• scaleX() , ScalyY()
• Imagex() , Imagey()

121. How can you access the Magento theme directory?

Answers:

• Mage::getSingleton(‘core/design_package’)->getSkinBaseDir()
• Mage::getBaseDir(‘skin’);
• $this->getSkinUrl()
• All of the above

122. Which of the following conditions can be checked to track down a product that is not showing in a category page? (choose all that apply)
Note: There may be more than one right answer.

Answers:

• Product visibility must be «Listed»;
• Product must be enabled;
• Stock and quantity must be greater than 0;
• If using multiple websites, check which website the product points to;

123. Which action should you perform to make it possible to display your custom attribute value on the product list?

Answers:

• Set «used_in_product_listing» property for this attribute to «1».
• Rewrite the method Mage_Catalog_Block_Product_List::_getProductCollection() to add additional attributes to select.
• Observe the «catalog_product_collection_load_before» event to add the attribute to select.
• You can use «used_in_product_list» property for this attribute to «0».

124. How many tables are created when a new EAV module is created?

Answers:

• 3
• 4
• 5
• 6

125. How can we disable magento extension for a particular page?

Answers:

• cms_index_index>
<reference name=”footer”>
<disable name=”newsletter”/>
</reference>
</cms_index_index>
• cms_index_index>
<reference name=”footer”>
<disable_extension name=”newsletter”/>
</reference>
</cms_index_index>
• cms_index_index>
<reference name=”footer”>
<remove name=”newsletter”/>
</reference>
</cms_index_index>
• All of the above

126. To create a base grid block you need to define the following function?

Answers:

• getMassactionBlock()
• _prepareMassactions()
• _prepareMassaction()
• getMassactionBlocks()

127. Which statement is false about a service contract?

Answers:

• It enables Magento and third-party developers to report system dependencies through composer.json files and, consequently, guarantee compatibility among Magento versions.
• A service contract includes data interfaces, which preserve data integrity, and service interfaces, which hide business logic details from service requestors such as controllers, web services, and other modules.
• Magento is a modular system that enables third-party developers to customize and overwrite core parts of its framework. This flexibility comes for free.
• A service contract is a set of PHP interfaces that are defined for a module

128. Which of the following will sort any collection in Magento?

Answers:

• The array sort function
• The Magento sort collection callback
• toArray($fields)
• The usort Method

129. Which of the following is not a Magento area type?

Answers:

• Magento Admin
• Core
• Storefront
• Basic

130. What is stored in the var directory?

Answers:

• 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.
• Variable values for email templates.

131. CRUD stands for the four basic types of database operations , , ___, and delete?

Answers:

• read,write,update
• update, read,write
• load, write,read
• create, read, update

132. Which code will get the tax amount on a page in Magento?

Answers:

• Mage::helper(‘checkout’)->getQuote()->getShippingAddress()->getData(‘tax_amount’);
• $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 = ‘’;
}
• $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();
}
}
• <?php
$order = Mage::getModel(‘sales/order’)->loadByIncrementId($this->getOrderId());
$data = $order->getData();
?>

133. Which of the following will sort products in the catalog by the date they were added?

Answers:

• Under “app/code/core/Mage/Catalog/Model/Config.php”, add this value to the $options array: ‘created_at’ => Mage::helper(‘catalog’)->__(‘Date’)
• 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”);
• Under “app/code/core/Mage/Catalog/Model/Config.php”, add this value to the $options array: ‘sort_by’ => Mage::helper(‘catalog’)->__(‘Date’)
• It’s not possible to sort products in the catalog by date.

134. Is it possible to trigger an event after an order has been set to “processing”?

Answers:

• Yes, by using a custom module.
• Yes, by registering an event.
• No, since it’s a security threat.
• No, since no additional action can be added at this stage.

135. Which of the following code samples will get all products sorted by ‘position’, assuming ‘position’ is of a numeric type?

Answers:

• $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’) ->addAttributeToSort(‘position’, ‘ASC’); ->load();
• $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’) ->addOrder(‘position’, ‘ASC’); ->load();
• 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”);
• 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();

136. Which of the following statements are correct about Magento quotes?

Answers:

• Quotes are offers to the user, which if the user accepts get converted into orders.
• The lifetime of the quote cannot be controlled.
• Quotes don’t deal with metadata about the store.
• Quotes are not related to order payment and shipping method information.

137. Select which method will register observers/hooks to events in Magento:

Answers:

• Mage::registerObserver(‘<EventNameToHook>’,’MyClass::observerFunction’);
• Using the option in the Magento Admin panel: System > Configuration > Advanced > Developer > Register Observer
• 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>
• Mage::registerObserver(‘myglobalobserver’); Function myglobalobserver($event,$args){ switch($event){ case ‘event1’: processevent1($args); break; case ‘event2’: processevent2($args); break; } }

138. 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:

• RewriteCond %{HTTP_HOST} ^oldstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourOldStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
• RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourNewStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
• RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]
• RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ – [E=MAGE_RUN_CODE:yourNewStoreCode] RewriteRule ^ – [E=MAGE_RUN_TYPE:website]

139. Which of the following will save a custom session variable in Magento?

Answers:

• $_SESSION[‘name’] = ‘frontend’;
• $session = Mage::getSingleton(“core/session”, array(“name”=>”frontend”)); $session->setData(“device_id”, 4);
• Mage::getSingleton( ‘customer/session’ )->setValue( ‘name’, array( 1, 2, 3 ) );
• None of the above

140. Which of the following will get information (‘customer_referrer_id’) from a currently logged-in admin user?

Answers:

• $collection->addAttributeToFilter(‘customer_referrer_id’, $referrer_id); $referrer_id = Mage::getSingleton(‘admin/session’)->getUser()->getId();
• $collection->addAttributeToSelection(‘customer_referrer_id’, $referrer_id); $referrer_id = Mage::getSingleton(‘admin/session’)->getUser()->getId();
• $collection->addAttributeToFilter(‘customer_referrer_id’, $referrer_id); $referrer_id = getSingleton(‘admin/session’)->getUser()->getId();
• None of these.

141. Which of the following will display a product’s thumbnail?

Answers:

• $product->hasThumbnail()) $product->setThumbnail($product->getImage());
• <img src=”<?php echo $this->helper(‘catalog/image’)->init($_item->getProductThumbnail(), ‘image’)->resize(50); ?>” alt=”<?php echo $_item->getName() ?>” />
• <img src=”<?php echo $_item->getProduct()->getThumbnailUrl() ?>” alt=”<?php echo $_item->getName() ?>” />
• <img src=”<?php echo $this->helper(‘catalog/image’)->init($_item->getProduct(), ‘thumbnail’)->resize(50); ?>” alt=”<?php echo $_item->getName() ?>” />

142. Consider the following code:
<block type=”A/B” name=”root” output=”toHtml” template=”example/view.phtml”>
What is the meaning of A/B?

Answers:

• “Module’s alias” / “Class name relative to the alias”
• “Controller’s Alias” / “Class name relative to the alias”
• “Controller’s Class” / “Method Name”
• “Method Name” / “Parameter”

143. Which of the following code samples will display a list of both active and inactive sub-categories of the current category?

Answers:

• <?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; ?>
• <?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; ?>
• <?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; ?>
• None of the above.

144. Which of the following will return a visitor’s UserAgent information?

Answers:

• Mage::helper(‘core/http’)->getHttpUserAgent()
• Mage::helper(‘core/mage’)->getHttpUserAgent()
• Mage::helper(‘core/mage’)->getHttpAgent()
• Mage::helper(‘core/http’)->getHttpUserServer()

145. How can account navigation links be changed?

Answers:

• Using an XML file to define the template
• Using a third party module
• Either using an XML file to define the template, or using a third party module
• None of these.

146. Which of the following will correctly add a custom event in Magento?

Answers:

• Mage::registerEvent
• Mage::dispatchEvent
• Mage::addAction
• Mage::registerObserverEvent

147. Which XML file(s) should be checked when the following Magento error occurs during installation?
“PHP Extensions “0” must be loaded”

Answers:

• config.xml in app/code/core/Mage/Install/etc
• install.xml in app/code/core/Mage/Install/etc
• extensions.xml in app/code/core/Mage/Install/etc
• None of these

148. Which of the following will set a template only if a particular module is disabled in Magento?

Answers:

• <action method=”setTemplate” ifconfig=”advanced/modules_disable_output/Myname_Mymodule”> <template>mytemplate.phtml</template> </action>
• 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; } }
• <action method=”setTemplate”> <template helper=”mymodule/myhelper/switchTemplateIf”/> </action>
• None of these.

149. Which of the following XML files will remove an item from Magento’s admin panel navigation?

Answers:

• <?xml version=”1.0″ ?> <config> <menu> <xmlconnect> <disabled>1</disabled> </xmlconnect> </menu> </config>
• <?xml version=”1.0″ ?> <config> <menu> <xmlconnect> <hide>1</hide> </xmlconnect> </menu> </config>
• <?xml version=”1.0″ ?> <config> <menu> <xmlconnect> <delete>1</delete> </xmlconnect> </menu> </config>
• Items under the Magento admin panel can’t be removed.

150. Which of the following will get active store information (such as the store’s name) in Magento?

Answers:

• Mage::app()->getStore();
• Mage::app()->getStoreId();
• Mage::app()->getName();
• None of the above

151. What is the best way to store session values in Magento?

Answers:

• $myValue=’Hello world’; Mage::getSingleton( ‘customer/session’ )->setMyValue($myValue);
• $myValue=’Hello world’; Mage::getSingleton( ‘core/session’ )->setMyValue($myValue);
• $myValue=’Hello world’; Mage::getSingleton( ‘core/variable’ )->setMyValue($myValue);
• $myValue=’Hello world’; $_SESSION[‘MyValue’] = $myValue;

152. The “Suspected Fraud” Order status is grouped under which state?

Answers:

• Processing state
• Payment Processing state
• Pending shipment state
• Payment Review state

153. Which of the following needs to be edited to input and display the order attributes in Magento?

Answers:

• /app/design/adminhtml/default/default/template/sales/order/view/info.phtml
• /app/design/adminhtml/default/default/template/salesext/edit_form.phtml
• /app/code/local/CWACI/SalesExt/controllers/Adminhtml/Sales/OrderController.php
• Both /app/design/adminhtml/default/default/template/sales/order/view/info.phtml and /app/code/local/CWACI/SalesExt/controllers/Adminhtml/Sales/OrderController.php

154. 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:

• Replace the logo in the base theme skin directory.
• Create a new theme and replace the new logo in the skin directory.
• Update the logo in all transactional emails.
• Create a new theme and place the new logo, named as “logo_email.png”, in the skin directory.

155. When does the following error occur? “Not all products are available in the requested quantity”

Answers:

• When the products are out of stock, but the cart still proceeded to checkout
• When the products are in stock, but not in the cart
• When no products are available
• None of these.

156. Which of the following will change the order of existing blocks via XML?

Answers:

• <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>
• <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>
• <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>
• It is not possible to edit the order of existing blocks.

157. Which of the following is the minimum memory requirement for running a Magento site?

Answers:

• at least 128MB
• at least 256MB
• at least 512MB
• over 512MB

158. How can the checkout process be skipped for downloadable products in Magento?

Answers:

• The checkout step cannot be skipped in Magento.
• Downloadable products automatically do not require checkout.
• There is an option in the admin panel to skip the checkout step for downloadable products.
• Magento does not support downloadable products.

159. Which of the following conditions must be met in order to successfully run a Magento install script?

Answers:

• The install script should be placed in MODULE/sql/RESOURCES_KEY/SCRIPT_NAME.
• The install script should be named using the convention, mysql4-install-MODULE_VERSION.php
• The module version in config.xml and in the install script file name must be same.
• All of these.

160. 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:

• Database table ‘core_config_data’
• config.inc file at magento root
• app/etc/config.xml
• app/etc/local.xml

161. What is the best way to create global variables which can be used everywhere in Magento?

Answers:

• Creating a empty module and adding a system.xml file to it
• Using the Magento Admin panel: System > Custom Variables > create a new custom variable
• Via a Magento Session $myValue = ‘Hello World’; Mage::getSingleton(‘core/session’)->setMyValue($myValue);
• $myValue = ‘Hello World’; Mage::getModel(‘core/variable’)->addMyValue($myValue);

162. 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:

• There is no solution; a PHP file cannot be used as a stylesheet.
• 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”>
• Call a static CSS file instead of using a PHP file as a stylesheet.
• Send a valid Content-Type HTTP header, as in: header(“content-type: text/css”);

163. What is the recommended way to override/extend Magento core functionality?

Answers:

• Directly edit the core files of Magento with proper commenting.
• Mage::registerOverride(‘CoreClassName’,’CoreFunctionName’,’MyClassName’,’MyFunctionname’);
• Copy the original Magento core file to the app/code/local folder and customize that file.
• 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

164. An observer in Magento is defined as a:

Answers:

• Method
• Class
• Event
• None of these.

165. What is the difference between “Flush Magento Cache” and “Flush Cache Storage” in the Magento Cache Management System?

Answers:

• “Flush Magento Cache” removes “/tmp/” folder’s cache only, while “Flush Cache Storage” clears everything.
• “Flush Cache Storage” removes “/tmp/” folder’s cache only, while “Flush Magento Cache” clears everything.
• “Flush Magento Cache” and “Flush Cache Storage” are equivalent; they work the same way.
• None of the above.

166. Which of the following will get a list of products belonging to a specific category within a view file?

Answers:

• $productCollection = Mage::getResourceModel(‘catalog/product_collection’) ->addCategoryFilter($category);
• {{block type=”catalog/product_list” category_id=”7″ template=”catalog/product/list.phtml”}}
• $productCollection = Mage::getResourceModel(‘catalog/product_collection’) ->addFilter($category);
• $productCollection = Mage::getModel(‘catalog/product_collection’) ->addCategoryFilter($category);

167. 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:

• $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(); } }
• $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(); } }
• $categories = Mage::getModel(‘catalog/category’) ->getCollection() ->setLoadProducts(true); foreach ($categories as $category) { print $category->getName(); foreach($category->getProducts() as $product){ print $product->getName(); } }
• $products = Mage::getModel(‘catalog/product’) ->getCollection(); foreach ($products as $product) { print $product->getCategory()->getName(); print $product->getName(); }

168. Which of the following will call a static block inside one of Magento’s template files?

Answers:

• $this->setBlockId(‘my_static_block_name’)->toHtml()
• $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘my_static_block_name’)->toHtml()
• $this->createBlock(‘cms/block’)->setBlockId(‘my_static_block_name’)->toHtml()
• $this->getLayout()->createBlock(‘cms/block’)->BlockId(‘my_static_block_name’)->toHtml()

169. Which of the following Magento objects will be created during checkout?

Answers:

• sales/payment
• sales/tax
• sales/order
• sales/quote

170. 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:

• <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>
• <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>
• <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>
• None of the above.

171. What is the correct method to add an external JavaScript file to Magento’s local.xml file?

Answers:

• <action method=”addScript”><script>jquery/jquery.js</script></action>
• <action method=”addCss”><script>jquery/jquery.js</script></action>
• <action method=”addJS”><script>jquery/jquery.js</script></action>
• None of the above

172. Which of the following will check whether the currently logged-in customer ever placed an order at the Magento store?

Answers:

• $order = Mage::getModel(‘sales/order’)->getCollection() ->addAttributeToFilter(‘customer_id’,$session->getId()) ->getFirstItem(); if ($orders->getSizeValue()) { }
• $orders = Mage::getResourceModel(‘sales/order_collection’) ->addFieldToSelect(‘*’) ->addFieldToFilter(‘entity_id’, $customer->getEntityId()); if ($orders->getSize()) { }
• $orders = Mage::getResourceModel(‘sales/order_collection’) ->addFieldToFilter(‘customer_id’, $customer->getId()); if ($orders->getValue()) { }
• $orders = Mage::getResourceModel(‘sales/order_collection’) ->addFieldToSelect(‘*’) ->addFieldToFilter(‘customer_id’, $customer->getId()); if ($orders->getSize()) { }

173. How can a new column be added in sales_flat_order to save a custom value in Magento?

Answers:

• By adding column name in Model
• By adding column name in Controller
• By adding column name in Block
• By defining column name in Block and table

174. Which of the following will get the order increment ID in Magento?

Answers:

• $order = Mage::getSingleton(‘sales/order’)->getLastOrderId(); $lastOrderId = $order->getIncrementId();
• $orderId = $this->getOrderId();
• $order = Mage::getModel(‘sales/order’); $order->load(Mage::getSingleton(‘sales/order’)->getLastOrderId()); $lastOrderId = $order->getIncrementId();
• None of these.

175. Which of the following will get the tax amount on a page in Magento?

Answers:

• Mage::helper(‘checkout’)->getQuote()->getShippingAddress()->getData(‘tax_amount’);
• $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 = ”; }
• $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(); } }
• <?php $order = Mage::getModel(‘sales/order’)->loadByIncrementId($this->getOrderId()); $data = $order->getData(); ?>

176. Which of the following will retrieve a list of all shipping methods in Magento?

Answers:

• 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; }
• $salesQuoteRate = Mage::getModel(‘sales/quote_address_rate’)->load($rate_id); if($salesQuoteRate){ echo ‘<br/>CODE : ‘.$salesQuoteRate->getCode(); echo ‘<br/>METHOD : ‘.$salesQuoteRate->getMethod(); }
• $iOrderId = Mage::getSingleton(‘checkout/session’)->getLastRealOrderId(); $oOrder = Mage::getModel(‘sales/order’)->loadByIncrementId($iOrderId); echo $oOrder->getShippingMethod(); echo $oOrder->getShippingDescription();
• echo Mage::getSingleton(‘checkout/session’)->getQuote()->getShippingAddress()->getShippingMethod();

177. Which of the following will list all products from a particular category?

Answers:

• $products = Mage::getModel(‘catalog/category’)->load($category_id) ->getProductCollection() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->addAttributeToFilter(‘special_price’, array(‘neq’ => “”)) ->setOrder(‘price’, ‘ASC’) ;
• $productCollection = Mage::getResourceModel(‘catalog/product_collection’) ->addCategoryFilter($category);
• $products = Mage::get((‘catalog/category’)->load($category_id) ->getCollection() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->addAttributeToFilter(‘special_price’, array(‘neq’ => “”)) ->setOrder(‘price’, ‘ASC’) ;
• $products = Mage::getModel(‘catalog/category’)->load($category_id) ->getProduct() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘status’, 1) ->addAttributeToFilter(‘visibility’, 4) ->addFilter(‘special_price’, array(‘neq’ => “”)) ->setOrder(‘price’, ‘ASC’) ;

178. 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 Custom default theme 2 Magento base theme 3 Custom non-default theme
• 1 Magento base theme 2 Custom default theme 3 Custom non-default theme
• 1 Custom non-default theme 2 Custom default theme 3 Magento base theme
• None of the above

179. What is the correct method for calling a single product inside a static block?

Answers:

• {{block type=”media/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
• {{block type=”catalog/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
• {{block type=”all/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}
• {{block type=”categories/product_single” product_id=”1″ template=”catalog/product/singleproduct.phtml”}}

180. Which of the following code samples will link a configurable product’s images to its constituent simple products, in the product details page?

Answers:

• $_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]); }
• $_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]); }
• $_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]); }
• $_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]); }

181. Which of the following will add a new custom block on the product details page after the media block, using a custom module?

Answers:

• <reference name=”product.info”> <block type=”mymodule/folder_class” name=”mymodule.folder.class” template=”mymodule/folder/class.phtml” as=”mymodule_folder_class”></block> </reference>
• <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’);?>
• <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’);?>
• None of the above.

182. Which of the following methods can be used add a new attribute to all products?

Answers:

• Using XML layout files
• By creating a new field in the database table named ‘catalog_attributes’
• Via the Magento Admin panel (Manage Attributes)
• By creating a new module

183. 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:

• catalog/navigation
• core/text_list
• page/template_container
• page/html

184. What is the difference between the isSaleable() and isAvailable() functions?

Answers:

• 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”.
• There is no difference between the two functions.
• isSaleable() checks if the product’s type can be sold, while isAvailable() checks if the product itself can be sold.
• 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.

185. Which of the following Magento classes should be used for adding custom duties/taxes to a quote during the checkout process?

Answers:

• Mage_Sales_Model_Quote_Item_Option
• Mage_Sales_Model_Quote_Address_Total_Abstract
• Mage_Sales_Model_Quote_Item
• Mage_Sales_Model_Quote_Payment

186. Select which conditions can be checked to track down a product that is not showing in a category page.
Note: There may be more than one right answer.

Answers:

• Product visibility must be “Listed”;
• Product must be enabled;
• Stock and quantity must be greater than 0;
• If using multiple websites, check which website the product points to;

187. How can programmatically added bundle products be shown in Magento’s front-end?

Answers:

• By re-indexing
• By using the following codes: Mage::register(‘product’, $product); Mage::register(‘current_product’, $product); $product->setCanSaveConfigurableAttributes(false); $product->setCanSaveCustomOptions(true);
• By using the following: 1. setBundleOptionsData() 2. setBundleSelectionsData() 3. setCanSaveBundleSelections(true)
• It is not possible to show programmatically added bundle products in the front-end.

188. Which of the following is the correct method to use to check if custom options were added to a product?

Answers:

• $product->hasCustomType();
• $product->hasCustomOptions();
• $product->hasOptions();
• $product->hasOptionsType();

189. Which of the following Events are triggered when the payment has been confirmed?

Answers:

• checkout_onepage_controller_success_action
• checkout_payment_confirmed
• sales_order_payment_pay
• payment_confirmed_action

190. Which of the following statements are true regarding custom options for products in Magento?
Note: There may be more than one right answer.

Answers:

• Custom options are only stored on the quote as option IDs and values.
• Every time the options are rendered, they are reloaded from the database.
• If the values for custom options are modified, they would need to be saved, and that will set them for all users.
• None of these.