Question 1: What is Magento?
Magento is an ecommerce platform created on open source technology, which provides online merchants with an exceptional flexibility. Magento is CMS which control content, look and functionality their ecommerce store. It is one of the best CMS known for ecommerce website.
Question 2: What are the different edition of Magento?
1) Magento Community Edition
2) Magento Enterprise Edition
3) Magento Professional Edition
4) Magento .go
Question 3: What are the different features of Magento?
1) User Management
2) Customer Management
3) Product Management
4) Order Management
5) Payment Management
6) Site Management
7) Search engine optimization
8) International Support
Question 4: How to improve magento performance?
1) Enabled magento caching
2) MySQL Query caching
3) Enable Gzip Compression
4) Disable any unused modules
5) Disable the Magento log
6) Optimise your images
7) Combine external CSS/JS into one file
8) Enable Apache KeepAlives: Make sure your Apache configuration has KeepAlives enabled.
9) Optimize your Server
10) Put Stylesheets at the Top (CSS Files in head tag)
11) Put Scripts at the Bottom (Js files in footer)
Question 5: What technology used by Magento?
1) Magento uses PHP as a web server scripting language
2) MySQL Database.
3) Zend Framework. This allows for separation of the ModelViewController
4) The data model is based on the Entity Attribut Value model that stores data objects in tree structures, thus allowing a change to a data structure without changing the database definition
Question 6: What is initial Release date of magento?
March 31, 2008
Question 7: What is the difference between Mage::getSingletone() and Mage::getModel() in Magento?
Mage::getSingletone() finds for an existing object if not then create that a new object(For ex: Session in magento) but Mage::getModel() always creates a new object(For ex: get product collection).
Question 8: How Magento’s MVC works:
1) When you enter the URL something like:
http://www.site.com/frontname/controller/method/param1/value1/param2/value2
this URL is intercepted by index.php which instantiates Magento application
2) Magento application instantiates Front Controller object
3) Further, front controller instantiates Router objects (specified in module’s config.xml, global tag)
4) Now, Router is responsible to “match” the frontname which is in our URL
5) If “match” is found, it sees controller name and method name in the URL, which is finally called.
6) Now depending on what is written in action name (method name), it is executed. If any models are
called in it, the controller method will instantiate that model and call the method in it which is requested.
7) Then the controller action (method) instantiate the Layout object, which calls Block specified for this
action (method) name (Each controller action name have block and template file associated with it,
which can be found at app/design/frontend or adminhtml/namespace/module/layout/module.xml file,
name of layout file (module.xml) can be found in config.xml of that module, in layout updates tag).
8) Template file (.phtml) now calls the corresponding block for any method request. So, if you write $this->methodName in .phtml file, it will check “methodName” in the block file which is associated in
module.xml file.
10) Block contains PHP logic. It references Models for any data from DB.
11) If either Block, Template file or Controller need to get/set some data from/to database, they can call
Model directly like Mage::getModel(‘modulename/modelname’).
For diagramatic view: click here (courtsey: Alan Storm)
Question 9: How Magento ORM works?
ORM stands for Object Relational Mapping. It’s a programming technique used to convert different types of data to Objects and Object to Data.
There are two types of ORM model
1) flat table or our regular table structure.
2) EAV (Entity Attribute Value), which is quite complicated and expensive to query.
Question 10: What is EAV in Magento?
EAV stands for Entity Attribute Value, is a technique which allows you to add unlimited columns to your table virtually. Means, the fields which is represented in “column” way in a regular table, is represented in a “row” (records) way in EAV. In EAV, you have one table which holds all the “attribute” (table field names) data, and other tables which hold the “entity” (id or primary id) and value (value for that id) against each attribute.
In Magento, there is one table to hold attribute values called eav_attribute and 5 other
tables which holds entity and data in fully normalized form,
1) eav_entity,(Main entity table)
2) eav_entity_int (for holding Integer values),
3) eav_entity_varchar (for holding Varchar values),
4) eav_entity_datetime (for holding Datetime values),
5) eav_entity_decimal (for holding Decimal/float values),
6) eav_entity_text (for holding text (mysql Text type) values).
EAV is expensive and should only be used when you are not sure about number of fields in a table which can vary in future. To just get one single record, Magento joins 4 to 5 tables to get data in EAV. But this doesn’t mean that EAV only has drawbacks. The main advantage of EAV is when you may want to add table field in future, when there are thousands or millions of records already present in your table. In regular table, if you add table field with these amount of data, it will screw up your table, as for each
empty row also some bytes will be allocated as per data type you select. While in EAV, adding the table column will not affect the previously saved records (also the extra space will not get allocated!) and all the new records will seamlessly have data in these columns without any problem.
Question 11: How to include CMS block in template file(.phtml)?
echo $this->getLayout()->createBlock('cms/block')->setBlockId('blockIdentifire')->toHTML();
Question 12: How to include CMS block in CMS page?
{{block type=’cms/block’ block_id=’blockIdentifire’}}
Question 13: How to call phtml file in CMS page and CMS block?
{{block type=’cms/page’ template=’templatePath’}}
Question 14: How to get the Total Price of items currently in the Cart?
formatPrice(Mage::getSingleton(‘checkout/cart’)->getQuote()->getGrandTotal()); ?>
Question 15: What are the addAttributeToFilter Conditionals in Magento?
addAttributeToFilter like where condition of SQL query
For ex: select * from data where status=1 (SQL QUERY)
In Magento: addAttributeToFilter('status', array('eq' => 1));
Equals: eq
$_products->addAttributeToFilter('status', array('eq' => 1));
Not Equals: neq
$_products->addAttributeToFilter('sku', array('neq' => 'testproduct'));
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' => 'errprod%'));
In in:
$_products->addAttributeToFilter('id', array('in' => 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));
Question 16: How to add an external javascript/css file in Magento?
For CSS File
<action method="addCss"><stylesheet>css/yourstyle.css</stylesheet></action>
For JS File
<action method="addJs"><script>js/yourfile.js</script></action>
Question 17: When will you need to clear cache to see the changes in Magento?
When you have added/modified XML, JS, CSS file(s).
Question 18: Difference between EAV and flat model
EAV is entity attribute value database model, where data is fully in normalized form. Each column data
value is stored in their respective data type table.
Example, for a product,
product ID is stored in catalog_product_entity_int table,
product name in catalog_product_entity_varchar,
product price in catalog_product_entity_decimal,
product created date in catalog_product_entity_datetime and
Product description in catalog_product_entity_text table.
EAV is complex as it joins 5 to 6 tables even if you want to get just one product’s details. Columns are called attributes in EAV. Flat model uses just one table, so it’s not normalized and uses more database space. It clears the EAV overhead, but not good for dynamic requirements where you may have to add more columns in database table in future. It’s good when comes to performance, as it will only require one query to load whole product instead of joining 5 to 6 tables to get just one product’s details. Columns are called fields in flat model.
Question 19: How will you add/remove content from core’s system.xml file?
1)
<config>
<sections>
<catalog>
<groups>
<frontend>
<label>Overriding Catalog Frontend in system config</label>
</frontend>
</groups>
</catalog>
</sections>
</config>
2)
<config>
<sections>
<payment>
<groups>
<cashondelivery>
<fields><changing cashondelivery payment method settings></fields>
</cashondelivery>
</groups>
</payment>
</sections>
</config>
Question 20: What are “magic methods” in Magento?
Magento uses __call(), __get(), __set(), __uns(), __has(), __isset(), __toString(), __construct(), etc.
Question 21: Explain different types of sessions in Magento (e.g. customer/session, checkout/session, core/session) and the reason why you store data in different session types?
Customer sessions stores data related to customer, checkout session stores data related to quote and order. They are actuall under one session in an array. So firstname in customer/session will be
$_SESSION['customer']['firstname'] and cart items count in checkout/session will be
$_SESSION['checkout']['items_count']. The reason Magento uses session types separately is because once the order gets placed, the checkout session data information should get flushed which can be easily done by just unsetting $_SESSION['checkout'] session variable. So that the session is not cleared, just session data containing checkout information is cleared and rest all the session types are still intact.
Question 22: What are the commonly used block types? What is the special in core/text_list block type.
Commonly used block types:
1)core/template,
2)page/html,
3)page/html_head,
4)page/html_header,
5)page/html_wrapper,
6)page/html_breadcrumbs,
7)page/html_footer,
8)page/template_links,
9)core/text_list,
10)core/messages,
11)page/switch.
Some blocks like content, left, right etc. are of type core/text_list
Question 23: Where is the relation between configurable product and it’s simple product stored in database?
In the 2 tables:
catalog_product_relation
catalog_product_superlink_table
Question 24: How will you log current collection’s SQL query?
1) $collection->getSelect()->__toString(); OR
2) $collection->printLogQuery(true);
Question 25: How to get first item or last item from the collection?
$collection->getFirstItem() and $collection->getLastItem();
Question 26: How to change the theme for login user?
if(Mage::getSingleton('customer/session')->isLoggedIn()):
Mage::getDesign()->setPackageName('PackageName')->setTheme('ThemeName');
endif;
Question 27: How to run Custom Query in Magento ?
$db=Mage::getSingleton('core/resource')->getConnection('core_write');
$result=$db->query('SELECT * FROM users where id=4');
Question 28: What permissions required for file and folder In Magento?
A security Issue happen if Setting all the files & folders to 777 will make them writable by everyone.!
For the normal operation or installation of a Magento store, only 2 folders need to be writable:
1) media for web accessible files, such as product images
2) var for temporary (cache, session) and import/export files
Files and folders will need to be set 655 (nonwritable) Permission after installation.
Question 29:. What are handles in magento (layout)?
Handles are basically used for controlling the structure of the page like which block will be
displayed and where.
customer_logged_in handle is called only if customer is logged in
Question 30: Which factors effect performance of magento?
1. EAV structure of magento database, even for retrieving single entity the query becomes very
complex .
2. Magento’s template system involves a lot of recursive rendering
3. Huge XML trees built up for layout configuration, application configuration settings
Question 31: How to make product’s custom attribute searchable in adavance search?
Go to : Catalog > Attribues > Manage Attribues
Edit the attribute and select “Yes” for Use in Advanced Search.
Question 32: How to fetch 5 bestsellers products programmatically?
$collection = Mage::getResourceModel(‘reports/product_collection’)
->addOrderedQty()
->addAttributeToSelect(‘*’)
->setPage(1, 5)
->load();
foreach($collection as $_product)
{
echo $_product->getName();
}
Question 33: Why Magento use EAV database model ?
In EAV database model, data are stored in different smaller tables rather than storing in a single
table.product name is stored in catalog_product_entity_varchar table product id is stored in
catalog_product_entity_int table product price is stored in catalog_product_entity_decimal table Magento Use EAV database model for easy upgrade and development as this model gives more flexibility to play with data and attributes.
Question 34: Explain how you can show a certain number of products for guests in Magento?
In the toolbar block you will see
app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
there is a method:
Public function setCollection($collection);
Inside there is a piece of code:
$limit= (int)$this->get Limit();
If ($limit) {
$this ->_collection->setPageSize($limit);
}
You have to change variable $limit; you should override that block in the local pool, not change directly in the core. In order to see whether the customer is a guest, you can use this code
Mage:: getSingleton(‘customer/session’) -> isLoggedIn()
Quesion 35: Mention what all billing information can be managed through Magento?
From the client Magento account, you can do following things
Update your billing address
Add a credit card
View your billing history
Add a PayPal account
Produce a print ready receipt
Question 36: Explain how you can change Magento Core API settings?
To change Magento Core API settings, you have to
Go to Admin menu, choose System -> Configuration
Select Magento Core API on the left side of the Configuration Panel, under Services
Tap on to expand the General Settings section and you can
Type the name of the Default Response Charset that you want to use
Determine the Client Session Timeout in seconds
Click the Save Config button when complete
Question 37: How to change admin URL of Magento?
A: There are 2 ways to change admin URL of Magento:
1: Go to app/etc/local.xml file, search for <frontName>tag, replace adminpanel with your new admin url
e.g we have chnaged the adminpanel url to adminmagento in below example
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[adminmagento]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
2: You can also change Admin URL of magento in Admin panel of Magento
In your admin panel, go to System -> Configuration->Advanced ->Admin→Admin Base URL→Use Custom Admin URL, select to ‘yes’ to use custom admin URL, now enter new admin path in Custom admin path field and save it.
Magento is an ecommerce platform created on open source technology, which provides online merchants with an exceptional flexibility. Magento is CMS which control content, look and functionality their ecommerce store. It is one of the best CMS known for ecommerce website.
Question 2: What are the different edition of Magento?
1) Magento Community Edition
2) Magento Enterprise Edition
3) Magento Professional Edition
4) Magento .go
Question 3: What are the different features of Magento?
1) User Management
2) Customer Management
3) Product Management
4) Order Management
5) Payment Management
6) Site Management
7) Search engine optimization
8) International Support
Question 4: How to improve magento performance?
1) Enabled magento caching
2) MySQL Query caching
3) Enable Gzip Compression
4) Disable any unused modules
5) Disable the Magento log
6) Optimise your images
7) Combine external CSS/JS into one file
8) Enable Apache KeepAlives: Make sure your Apache configuration has KeepAlives enabled.
9) Optimize your Server
10) Put Stylesheets at the Top (CSS Files in head tag)
11) Put Scripts at the Bottom (Js files in footer)
Question 5: What technology used by Magento?
1) Magento uses PHP as a web server scripting language
2) MySQL Database.
3) Zend Framework. This allows for separation of the ModelViewController
4) The data model is based on the Entity Attribut Value model that stores data objects in tree structures, thus allowing a change to a data structure without changing the database definition
Question 6: What is initial Release date of magento?
March 31, 2008
Question 7: What is the difference between Mage::getSingletone() and Mage::getModel() in Magento?
Mage::getSingletone() finds for an existing object if not then create that a new object(For ex: Session in magento) but Mage::getModel() always creates a new object(For ex: get product collection).
Question 8: How Magento’s MVC works:
1) When you enter the URL something like:
http://www.site.com/frontname/controller/method/param1/value1/param2/value2
this URL is intercepted by index.php which instantiates Magento application
2) Magento application instantiates Front Controller object
3) Further, front controller instantiates Router objects (specified in module’s config.xml, global tag)
4) Now, Router is responsible to “match” the frontname which is in our URL
5) If “match” is found, it sees controller name and method name in the URL, which is finally called.
6) Now depending on what is written in action name (method name), it is executed. If any models are
called in it, the controller method will instantiate that model and call the method in it which is requested.
7) Then the controller action (method) instantiate the Layout object, which calls Block specified for this
action (method) name (Each controller action name have block and template file associated with it,
which can be found at app/design/frontend or adminhtml/namespace/module/layout/module.xml file,
name of layout file (module.xml) can be found in config.xml of that module, in layout updates tag).
8) Template file (.phtml) now calls the corresponding block for any method request. So, if you write $this->methodName in .phtml file, it will check “methodName” in the block file which is associated in
module.xml file.
10) Block contains PHP logic. It references Models for any data from DB.
11) If either Block, Template file or Controller need to get/set some data from/to database, they can call
Model directly like Mage::getModel(‘modulename/modelname’).
For diagramatic view: click here (courtsey: Alan Storm)
Question 9: How Magento ORM works?
ORM stands for Object Relational Mapping. It’s a programming technique used to convert different types of data to Objects and Object to Data.
There are two types of ORM model
1) flat table or our regular table structure.
2) EAV (Entity Attribute Value), which is quite complicated and expensive to query.
Question 10: What is EAV in Magento?
EAV stands for Entity Attribute Value, is a technique which allows you to add unlimited columns to your table virtually. Means, the fields which is represented in “column” way in a regular table, is represented in a “row” (records) way in EAV. In EAV, you have one table which holds all the “attribute” (table field names) data, and other tables which hold the “entity” (id or primary id) and value (value for that id) against each attribute.
In Magento, there is one table to hold attribute values called eav_attribute and 5 other
tables which holds entity and data in fully normalized form,
1) eav_entity,(Main entity table)
2) eav_entity_int (for holding Integer values),
3) eav_entity_varchar (for holding Varchar values),
4) eav_entity_datetime (for holding Datetime values),
5) eav_entity_decimal (for holding Decimal/float values),
6) eav_entity_text (for holding text (mysql Text type) values).
EAV is expensive and should only be used when you are not sure about number of fields in a table which can vary in future. To just get one single record, Magento joins 4 to 5 tables to get data in EAV. But this doesn’t mean that EAV only has drawbacks. The main advantage of EAV is when you may want to add table field in future, when there are thousands or millions of records already present in your table. In regular table, if you add table field with these amount of data, it will screw up your table, as for each
empty row also some bytes will be allocated as per data type you select. While in EAV, adding the table column will not affect the previously saved records (also the extra space will not get allocated!) and all the new records will seamlessly have data in these columns without any problem.
Question 11: How to include CMS block in template file(.phtml)?
echo $this->getLayout()->createBlock('cms/block')->setBlockId('blockIdentifire')->toHTML();
Question 12: How to include CMS block in CMS page?
{{block type=’cms/block’ block_id=’blockIdentifire’}}
Question 13: How to call phtml file in CMS page and CMS block?
{{block type=’cms/page’ template=’templatePath’}}
Question 14: How to get the Total Price of items currently in the Cart?
formatPrice(Mage::getSingleton(‘checkout/cart’)->getQuote()->getGrandTotal()); ?>
Question 15: What are the addAttributeToFilter Conditionals in Magento?
addAttributeToFilter like where condition of SQL query
For ex: select * from data where status=1 (SQL QUERY)
In Magento: addAttributeToFilter('status', array('eq' => 1));
Equals: eq
$_products->addAttributeToFilter('status', array('eq' => 1));
Not Equals: neq
$_products->addAttributeToFilter('sku', array('neq' => 'testproduct'));
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' => 'errprod%'));
In in:
$_products->addAttributeToFilter('id', array('in' => 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));
Question 16: How to add an external javascript/css file in Magento?
For CSS File
<action method="addCss"><stylesheet>css/yourstyle.css</stylesheet></action>
For JS File
<action method="addJs"><script>js/yourfile.js</script></action>
Question 17: When will you need to clear cache to see the changes in Magento?
When you have added/modified XML, JS, CSS file(s).
Question 18: Difference between EAV and flat model
EAV is entity attribute value database model, where data is fully in normalized form. Each column data
value is stored in their respective data type table.
Example, for a product,
product ID is stored in catalog_product_entity_int table,
product name in catalog_product_entity_varchar,
product price in catalog_product_entity_decimal,
product created date in catalog_product_entity_datetime and
Product description in catalog_product_entity_text table.
EAV is complex as it joins 5 to 6 tables even if you want to get just one product’s details. Columns are called attributes in EAV. Flat model uses just one table, so it’s not normalized and uses more database space. It clears the EAV overhead, but not good for dynamic requirements where you may have to add more columns in database table in future. It’s good when comes to performance, as it will only require one query to load whole product instead of joining 5 to 6 tables to get just one product’s details. Columns are called fields in flat model.
Question 19: How will you add/remove content from core’s system.xml file?
1)
<config>
<sections>
<catalog>
<groups>
<frontend>
<label>Overriding Catalog Frontend in system config</label>
</frontend>
</groups>
</catalog>
</sections>
</config>
2)
<config>
<sections>
<payment>
<groups>
<cashondelivery>
<fields><changing cashondelivery payment method settings></fields>
</cashondelivery>
</groups>
</payment>
</sections>
</config>
Question 20: What are “magic methods” in Magento?
Magento uses __call(), __get(), __set(), __uns(), __has(), __isset(), __toString(), __construct(), etc.
Question 21: Explain different types of sessions in Magento (e.g. customer/session, checkout/session, core/session) and the reason why you store data in different session types?
Customer sessions stores data related to customer, checkout session stores data related to quote and order. They are actuall under one session in an array. So firstname in customer/session will be
$_SESSION['customer']['firstname'] and cart items count in checkout/session will be
$_SESSION['checkout']['items_count']. The reason Magento uses session types separately is because once the order gets placed, the checkout session data information should get flushed which can be easily done by just unsetting $_SESSION['checkout'] session variable. So that the session is not cleared, just session data containing checkout information is cleared and rest all the session types are still intact.
Question 22: What are the commonly used block types? What is the special in core/text_list block type.
Commonly used block types:
1)core/template,
2)page/html,
3)page/html_head,
4)page/html_header,
5)page/html_wrapper,
6)page/html_breadcrumbs,
7)page/html_footer,
8)page/template_links,
9)core/text_list,
10)core/messages,
11)page/switch.
Some blocks like content, left, right etc. are of type core/text_list
Question 23: Where is the relation between configurable product and it’s simple product stored in database?
In the 2 tables:
catalog_product_relation
catalog_product_superlink_table
Question 24: How will you log current collection’s SQL query?
1) $collection->getSelect()->__toString(); OR
2) $collection->printLogQuery(true);
Question 25: How to get first item or last item from the collection?
$collection->getFirstItem() and $collection->getLastItem();
Question 26: How to change the theme for login user?
if(Mage::getSingleton('customer/session')->isLoggedIn()):
Mage::getDesign()->setPackageName('PackageName')->setTheme('ThemeName');
endif;
Question 27: How to run Custom Query in Magento ?
$db=Mage::getSingleton('core/resource')->getConnection('core_write');
$result=$db->query('SELECT * FROM users where id=4');
Question 28: What permissions required for file and folder In Magento?
A security Issue happen if Setting all the files & folders to 777 will make them writable by everyone.!
For the normal operation or installation of a Magento store, only 2 folders need to be writable:
1) media for web accessible files, such as product images
2) var for temporary (cache, session) and import/export files
Files and folders will need to be set 655 (nonwritable) Permission after installation.
Question 29:. What are handles in magento (layout)?
Handles are basically used for controlling the structure of the page like which block will be
displayed and where.
customer_logged_in handle is called only if customer is logged in
Question 30: Which factors effect performance of magento?
1. EAV structure of magento database, even for retrieving single entity the query becomes very
complex .
2. Magento’s template system involves a lot of recursive rendering
3. Huge XML trees built up for layout configuration, application configuration settings
Question 31: How to make product’s custom attribute searchable in adavance search?
Go to : Catalog > Attribues > Manage Attribues
Edit the attribute and select “Yes” for Use in Advanced Search.
Question 32: How to fetch 5 bestsellers products programmatically?
$collection = Mage::getResourceModel(‘reports/product_collection’)
->addOrderedQty()
->addAttributeToSelect(‘*’)
->setPage(1, 5)
->load();
foreach($collection as $_product)
{
echo $_product->getName();
}
Question 33: Why Magento use EAV database model ?
In EAV database model, data are stored in different smaller tables rather than storing in a single
table.product name is stored in catalog_product_entity_varchar table product id is stored in
catalog_product_entity_int table product price is stored in catalog_product_entity_decimal table Magento Use EAV database model for easy upgrade and development as this model gives more flexibility to play with data and attributes.
Question 34: Explain how you can show a certain number of products for guests in Magento?
In the toolbar block you will see
app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
there is a method:
Public function setCollection($collection);
Inside there is a piece of code:
$limit= (int)$this->get Limit();
If ($limit) {
$this ->_collection->setPageSize($limit);
}
You have to change variable $limit; you should override that block in the local pool, not change directly in the core. In order to see whether the customer is a guest, you can use this code
Mage:: getSingleton(‘customer/session’) -> isLoggedIn()
Quesion 35: Mention what all billing information can be managed through Magento?
From the client Magento account, you can do following things
Update your billing address
Add a credit card
View your billing history
Add a PayPal account
Produce a print ready receipt
Question 36: Explain how you can change Magento Core API settings?
To change Magento Core API settings, you have to
Go to Admin menu, choose System -> Configuration
Select Magento Core API on the left side of the Configuration Panel, under Services
Tap on to expand the General Settings section and you can
Type the name of the Default Response Charset that you want to use
Determine the Client Session Timeout in seconds
Click the Save Config button when complete
Question 37: How to change admin URL of Magento?
A: There are 2 ways to change admin URL of Magento:
1: Go to app/etc/local.xml file, search for <frontName>tag, replace adminpanel with your new admin url
e.g we have chnaged the adminpanel url to adminmagento in below example
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[adminmagento]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
2: You can also change Admin URL of magento in Admin panel of Magento
In your admin panel, go to System -> Configuration->Advanced ->Admin→Admin Base URL→Use Custom Admin URL, select to ‘yes’ to use custom admin URL, now enter new admin path in Custom admin path field and save it.
No comments:
Post a Comment