Magento Questions and Answers
Download Magento eBook

Download PDF Download Magento Questions eBook

Magento Questions and Answers: Submit Your Question

1 :: How to improve magento performance?

Enabled magento caching
MySQL Query caching
Enable Gzip Compression
Disable any unused modules
Disable the Magento log
Optimise your images
Combine external CSS/JS into one file
Enable Apache KeepAlives: Make sure your Apache configuration has KeepAlives enabled.
Is This Answer Correct?    1 Yes 0 No
Submit Your Answer

2 :: What are the handles in magento (layout)?

Handles are basically used for controlling the structure of the page like which block will be displayed and where. First level child elements of the node are called layout handles. Every page request can have several unique Handles. The handle is called for every page. handle for products belongs to virtual product type, PRODUCT_TYPE_simple is called for product details page of simple product type and PRODUCT_TYPE_virtual is called for the virtual product detail page and customer_logged_in handle is called only if customer is logged in. The muster_index_index handle is created by combining the frontName (muster), Action Controller (index), and Action Controller Action Method (index) into a single string and this handle will be called only when /muster/index/index url is accessed.

1 <layout version="0.1.0">
2 <muster_index_index>
3 <reference name="root">
4 <block type="page/html" name="root" output="toHtml" template="../somepage.phtml">
5 </block></reference>
6 </muster_index_index>
7 </layout>
Is This Answer Correct?    1 Yes 0 No
Submit Your Answer

3 :: How to change currency in INR in magento?

In Magento, Currency change is very easy just we need to follow below step:
1) From the Admin panel, select System > Configuration.
2) From the Configuration panel on the left, under General, select the Currency Setup tab.
Click to expand the Currency Options section. Then, do the following:
1) In the Base Currency list, select the primary currency that is used for store transactions.
2) In the Default Display Currency list, select the primary currency that is used to display pricing in your store.
3) In the Allowed Currencies list, select all currencies that are accepted as payment by your store.
When finished, click the Save Config button.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

4 :: How to customize currency symbols?

Currency symbols appear in the Admin panel of your store, and are also used throughout your storefront in orders, customer checkout, and so on.
1) From the Admin panel, select System > Manage Currency > Symbols.
2) Each enabled currency for your store appears in the Currency list.
3) Enter a custom symbol to use for each currency, or select the standard symbol selecting the Use Standard check-box to the right of each currency.
When finished, click the Save Currency Symbols button.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

5 :: What are the addAttributeToFilter Conditionals in Magento?

In Magento we can use addAttributeToFilter Conditions same as where in SQL.
Below are the all condtions:
Equals: eq
$_products->addAttributeToFilter('status', array('eq' => 1));

Not Equals - neq
$_products->addAttributeToFilter('sku', array('neq' => 'test-product'));

Like - like
$_products->addAttributeToFilter('sku', array('like' => 'UX%'));

One thing to note about like is that you can include SQL wildcard characters such as the percent sign.

Not Like - nlike
$_products->addAttributeToFilter('sku', array('nlike' => 'err-prod%'));

In - in
$_products->addAttributeToFilter('id', array('in' => array(1,4,98)));

When using in, the value parameter accepts an array of values.

Not In - nin
$_products->addAttributeToFilter('id', array('nin' => array(1,4,98)));

NULL - null
$_products->addAttributeToFilter('description', 'null');

Not NULL - notnull
$_products->addAttributeToFilter('description', 'notnull');

Greater Than - gt
$_products->addAttributeToFilter('id', array('gt' => 5));

Less Than - lt
$_products->addAttributeToFilter('id', array('lt' => 5));

Greater Than or Equals To- gteq
$_products->addAttributeToFilter('id', array('gteq' => 5));

Less Than or Equals To - lteq
$_products->addAttributeToFilter('id', array('lteq' => 5));
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

6 :: Explain the difference between Final class and Abstract class?

Final Class:
A Class which Can't be inherited by other class, that class is called final class.
You all knows that final class is inbuilt in java. But in C++ you have to create final class.Two types of Final class, you can create. One who want to create object of final class on Heap and other who wants to create object of Final class on stack.
1) It makes use of private constructor, virtual inheritance and friend class.
2) In place of private constructor, use private Destructor.
Because Constructor can be overloaded and Destructor can't be overloaded.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

7 :: Explain the difference between Mage::getSingletone() and Mage::getModel() in Magento?

Mage::getSingletone() always finds for an existing object if not then create that a new object but Mage::getModel() always creates a new object.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

8 :: What is Module conflict?

We install one module(Extension Conflict) to findout that Class which is Conflict. We have to written only one config file for both module.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

9 :: How to fetch bestsellers products programmatically?

1) <!--?php
2) Mage::getResourceModel('reports/product_collection')--->addOrderedQty()
3) ->addAttributeToSelect('*')->setPage(1, 5)->load();
4) ?>
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

10 :: How to create magento custom module?

Steps to create custom Magento module:
Namespace : Viral
Module Name : Mymodule
1) Create directory Mymodule in app/code/local/Viral
2) Create Block, controllers, etc, Module directories. Create controller, block and module file as required.
3) Create module configuration file (app/code/local/Viral/Mymodule/etc/config.xml).
4) Create xml file (app/etc/modules/Viral_ Mymodule.xml)to enable/disable module and tell magento system from which code pool that module will be taken.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

Place Your Question