1. Question: 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(); $categoryDetails = Mage::getModel('catalog/category')->load($category->getId()); $products = $categoryDetails->loadChildProducts(); foreach($products as $product){ Print $product->getName(); } }

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

    C
    $categories = Mage::getModel('catalog/category') ->getCollection() ->setLoadProducts(true); foreach ($categories as $category) { print $category->getName(); foreach($category->getProducts() as $product){ print $product->getName(); } }

    D
    $products = Mage::getModel('catalog/product') ->getCollection(); foreach ($products as $product) { print $product->getCategory()->getName(); print $product->getName(); }

    Note: Not available
    1. Report
  2. Question: Which of the following will call a static block inside one of Magento's template files?

    A
    $this->setBlockId('my_static_block_name')->toHtml()

    B
    $this->getLayout()->createBlock('cms/block')->setBlockId('my_static_block_name')->toHtml()

    C
    $this->createBlock('cms/block')->setBlockId('my_static_block_name')->toHtml()

    D
    $this->getLayout()->createBlock('cms/block')->BlockId('my_static_block_name')->toHtml()

    Note: Not available
    1. Report
  3. Question: Which of the following Magento objects will be created during checkout?

    A
    sales/payment

    B
    sales/tax

    C
    sales/order

    D
    sales/quote

    Note: Not available
    1. Report
  4. Question: 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?

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

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

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

    D
    None

    Note: Not available
    1. Report
  5. Question: What is the correct method to add an external JavaScript file to Magento's local.xml file?

    A
    <action method="addScript"><script>jquery/jquery.js</script></action>

    B
    <action method="addCss"><script>jquery/jquery.js</script></action>

    C
    <action method="addJS"><script>jquery/jquery.js</script></action>

    D
    None

    Note: Not available
    1. Report
  6. Question: Which of the following will check whether the currently logged-in customer ever placed an order at the Magento store?

    A
    $order = Mage::getModel('sales/order')->getCollection() ->addAttributeToFilter('customer_id',$session->getId()) ->getFirstItem(); if ($orders->getSizeValue()) { }

    B
    $orders = Mage::getResourceModel('sales/order_collection') ->addFieldToSelect('*') ->addFieldToFilter('entity_id', $customer->getEntityId()); if ($orders->getSize()) { }

    C
    $orders = Mage::getResourceModel('sales/order_collection') ->addFieldToFilter('customer_id', $customer->getId()); if ($orders->getValue()) { }

    D
    $orders = Mage::getResourceModel('sales/order_collection') ->addFieldToSelect('*') ->addFieldToFilter('customer_id', $customer->getId()); if ($orders->getSize()) { }

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