2014-05-15

Ques 1:An observer in Magento is defined as a: a) Method b) Class c) Event d) None of these

Ques 2:- Assuming a left column is going to be added, which of the following are possible values of the block type in the code below? a) catalog/navigation b) core/text_list c) page/template_container d) page/html

3) Assuming that a column needs to be added under Catalog >> Manage Products in Magento, which file will need to be edited?
a) app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Layout.php 5
b) app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Grid.php 0
c) app/code/local/Myname/Catalogextended/Block/Adminhtml/Catalog/Product/Design.php
d) A custom column cannot be added under Catalog >> Manage Products.

4) 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?
a) /media/
b) /media/import/
c) /import/
d) /.

5) 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?
a) $categories = Mage::getModel('catalog/category') ->getCollection(); foreach ($categories as $category) { print $category->getName();
b) $categoryDetails = Mage::getModel('catalog/category')->load($category->getId()); $products = $categoryDetails->loadChildProducts(); foreach($products as $product){ Print $product->getName(); } }
c) $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(); } }
d) $categories = Mage::getModel('catalog/category') ->getCollection() ->setLoadProducts(true); foreach ($categories as $category) { print $category->getName(); foreach($category->getProducts() as $product){ print $product->getName(); } } e) $products = Mage::getModel('catalog/product') ->getCollection(); foreach ($products as $product) { print $product->getCategory()->getName(); print $product->getName(); }

6) 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: a) catalog.product.related catalog.product.related
b) catalog.product.related catalog.product.related 1
c) catalog.product.related catalog.product.related 0
d) None of the above.

7) 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:
a) 1 Custom default theme 2 Magento base theme 3 Custom non-default theme
b) 1 Magento base theme 2 Custom default theme 3 Custom non-default theme
c) 1 Custom non-default theme 2 Custom default theme 3 Magento base theme
d) None of the above

8) Consider the following code:
What is the meaning of A/B?
Answers: a) "Module's alias" / "Class name relative to the alias"
b) "Controller's Alias" / "Class name relative to the alias"
c) "Controller's Class" / "Method Name"
d) "Method Name" / "Parameter"

9) 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: Possible several answers.
a) Because it is necessary for magento and you must use that session.
b) Because Magento relies heavily on the Zend Framework as the underpinning and it will be able to be ignored.
c) Because Magento relies heavily on the Zend Framework as the underpinning and I must use that for frontend session without condition.
d) It is the vestigial code, so I was able to delete the Zend cookie without any apparent deleterious effects

10) How can a new column be added in sales_flat_order to save a custom value in Magento? Answers: Possible several answers.
a) By adding column name in Model
b) By adding column name in Controller
c) By adding column name in Block
d) By defining column name in Block and table

11) How can account navigation links be changed?
Answers: a) Using an XML file to define the template
b) Using a third party module
c) Either using an XML file to define the template, or using a third party module
d) None of these.

12) How can programmatically added bundle products be shown in Magento's front-end? Answers: By re-indexing
a) By using the following codes: Mage::register('product', $product); Mage::register('current_product', $product); $product->setCanSaveConfigurableAttributes(false); $product->setCanSaveCustomOptions(true);
b) By using the following: 1. setBundleOptionsData() 2. setBundleSelectionsData() 3. setCanSaveBundleSelections(true)
c) It is not possible to show programmatically added bundle products in the front-end.

13) How can the checkout process be skipped for downloadable products in Magento?
Answers: a) The checkout step cannot be skipped in Magento.
b) Downloadable products automatically do not require checkout.
c) There is an option in the admin panel to skip the checkout step for downloadable products.
d) Magento does not support downloadable products.

14) How magento contact form can be shown on a CMS page?
Answers: a) By using block syntax {{block type="core/template" name="contactForm" template="contacts/form.phtml"}}
b) By Using Layout Update
c) By Creating an Widget of Contact form and adding that widget to CMS page
d) All of above is correct

15) Is it possible to trigger an event after an order has been set to "processing"?
Answers: a) Yes, by using a custom module.
b) Yes, by registering an event.
c) No, since it's a security threat.
d) No, since no additional action can be added at this stage.

Show more