1. Question: Which of the following will display a product's thumbnail?

    A
    $product->hasThumbnail()) $product->setThumbnail($product->getImage());

    B
    <img src="<?php echo $this->helper('catalog/image')->init($_item->getProductThumbnail(), 'image')->resize(50); ?>" alt="<?php echo $_item->getName() ?>" />

    C
    <img src="<?php echo $_item->getProduct()->getThumbnailUrl() ?>" alt="<?php echo $_item->getName() ?>" />

    D
    <img src="<?php echo $this->helper('catalog/image')->init($_item->getProduct(), 'thumbnail')->resize(50); ?>" alt="<?php echo $_item->getName() ?>" />

    Note: Not available
    1. Report
  2. Question: Consider the following code: <block type="A/B" name="root" output="toHtml" template="example/view.phtml"> What is the meaning of A/B?

    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"

    Note: Not available
    1. Report
  3. Question: Which of the following code samples will display a list of both active and inactive sub-categories of the current category?

    A
    <?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; ?>

    B
    <?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; ?>

    C
    <?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; ?>

    D
    None

    Note: Not available
    1. Report
  4. Question: Which of the following will return a visitor's UserAgent information?

    A
    Mage::helper('core/http')->getHttpUserAgent()

    B
    Mage::helper('core/mage')->getHttpUserAgent()

    C
    Mage::helper('core/mage')->getHttpAgent()

    D
    Mage::helper('core/http')->getHttpUserServer()

    Note: Not available
    1. Report
  5. Question: How can account navigation links be changed?

    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

    Note: Not available
    1. Report
  6. Question: Which of the following will correctly add a custom event in Magento?

    A
    Mage::registerEvent

    B
    Mage::dispatchEvent

    C
    Mage::addAction

    D
    Mage::registerObserverEvent

    Note: Not available
    1. Report
  7. Question: Which XML file(s) should be checked when the following Magento error occurs during installation? "PHP Extensions "0" must be loaded"

    A
    config.xml in app/code/core/Mage/Install/etc

    B
    install.xml in app/code/core/Mage/Install/etc

    C
    extensions.xml in app/code/core/Mage/Install/etc

    D
    None

    Note: Not available
    1. Report
  8. Question: Which of the following will set a template only if a particular module is disabled in Magento?

    A
    <action method="setTemplate" ifconfig="advanced/modules_disable_output/Myname_Mymodule"> <template>mytemplate.phtml</template> </action>

    B
    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; } }

    C
    <action method="setTemplate"> <template helper="mymodule/myhelper/switchTemplateIf"/> </action>

    D
    None

    Note: Not available
    1. Report
  9. Question: Which of the following XML files will remove an item from Magento's admin panel navigation?

    A
    <?xml version="1.0" ?> <config> <menu> <xmlconnect> <disabled>1</disabled> </xmlconnect> </menu> </config>

    B
    <?xml version="1.0" ?> <config> <menu> <xmlconnect> <hide>1</hide> </xmlconnect> </menu> </config>

    C
    <?xml version="1.0" ?> <config> <menu> <xmlconnect> <delete>1</delete> </xmlconnect> </menu> </config>

    D
    Items under the Magento admin panel can't be removed.

    Note: Not available
    1. Report
  10. Question: Which of the following will get active store information (such as the store's name) in Magento?

    A
    Mage::app()->getStore();

    B
    age::app()->getStoreId();

    C
    Mage::app()->getName();

    D
    None

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd