1. Question: Which of the following will display a customer's TAX/VAT number?

    A
    $taxvat = $order['customer_taxvat'];

    B
    $order->getData('customer_taxvat');

    C
    $order->getQuote()->getCustomerTaxvat();

    D
    $order->getData()->getCustomerTaxvat();

    Note: Not available
    1. Report
  2. Question: Why does the error, "front controller reached 100 router match iterations", occur?

    A
    There is an error in the code.

    B
    Some modules failed to load.

    C
    Router references were set incorrectly.

    D
    .htacces is blocking URLs.

    Note: Not available
    1. Report
  3. Question: Which of the following will sort products in the catalog by the date they were added?

    A
    Under "app/code/core/Mage/Catalog/Model/Config.php", add this value to the $options array: 'created_at' => Mage::helper('catalog')->__('Date')

    B
    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");

    C
    Under "app/code/core/Mage/Catalog/Model/Config.php", add this value to the $options array: 'sort_by' => Mage::helper('catalog')->__('Date')

    D
    It's not possible to sort products in the catalog by date.

    Note: Not available
    1. Report
  4. Question: Is it possible to trigger an event after an order has been set to "processing"?

    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.

    Note: Not available
    1. Report
  5. Question: Which of the following code samples will get all products sorted by 'position', assuming 'position' is of a numeric type?

    A
    $products = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('*') ->addAttributeToSort('position', 'ASC'); ->load();

    B
    $products = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('*') ->addOrder('position', 'ASC'); ->load();

    C
    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");

    D
    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();

    Note: Not available
    1. Report
  6. Question: Which of the following statements are correct about Magento quotes?

    A
    Quotes are offers to the user, which if the user accepts get converted into orders.

    B
    The lifetime of the quote cannot be controlled.

    C
    Quotes don't deal with metadata about the store.

    D
    Quotes are not related to order payment and shipping method information.

    Note: Not available
    1. Report
  7. Question: Select which method will register observers/hooks to events in Magento:

    A
    Mage::registerObserver(‘<EventNameToHook>’,’MyClass::observerFunction’);

    B
    Using the option in the Magento Admin panel: System > Configuration > Advanced > Developer > Register Observer

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

    D
    Mage::registerObserver(‘myglobalobserver’); Function myglobalobserver($event,$args){ switch($event){ case ‘event1’: processevent1($args); break; case ‘event2’: processevent2($args); break; } }

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

    A
    RewriteCond %{HTTP_HOST} ^oldstore.com RewriteRule ^ - [E=MAGE_RUN_CODE:yourOldStoreCode] RewriteRule ^ - [E=MAGE_RUN_TYPE:website]

    B
    RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ - [E=MAGE_RUN_CODE:yourNewStoreCode] RewriteRule ^ - [E=MAGE_RUN_TYPE:website]

    C
    RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ - [E=MAGE_RUN_CODE:yourStoreCode] RewriteRule ^ - [E=MAGE_RUN_TYPE:website]

    D
    RewriteCond %{HTTP_HOST} ^newstore.com RewriteRule ^ - [E=MAGE_RUN_CODE:yourNewStoreCode] RewriteRule ^ - [E=MAGE_RUN_TYPE:website]

    Note: Not available
    1. Report
  9. Question: Which of the following will save a custom session variable in Magento?

    A
    $_SESSION['name'] = 'frontend';

    B
    $session = Mage::getSingleton("core/session", array("name"=>"frontend")); $session->setData("device_id", 4);

    C
    Mage::getSingleton( 'customer/session' )->setValue( 'name', array( 1, 2, 3 ) );

    D
    None

    Note: Not available
    1. Report
  10. Question: Which of the following will get information ('customer_referrer_id') from a currently logged-in admin user?

    A
    $collection->addAttributeToFilter('customer_referrer_id', $referrer_id); $referrer_id = Mage::getSingleton('admin/session')->getUser()->getId();

    B
    $collection->addAttributeToSelection('customer_referrer_id', $referrer_id); $referrer_id = Mage::getSingleton('admin/session')->getUser()->getId();

    C
    $collection->addAttributeToFilter('customer_referrer_id', $referrer_id); $referrer_id = getSingleton('admin/session')->getUser()->getId();

    D
    None

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