$collection->getFirstItem() and $collection->getLastItem();
Thursday, June 9, 2016
commonly used block types
core/template
page/html
page/html_head
page/html_header
page/html_footer
page/template_links
page/html_breadcrumbs
core/text_list
page/html_wrapper
page/switch
core/messages
page/html
page/html_head
page/html_header
page/html_footer
page/template_links
page/html_breadcrumbs
core/text_list
page/html_wrapper
page/switch
core/messages
Add an external javascript/css file to Magento
<action method="addJs"><script>js/custom.js</script></action>
<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
OR
<action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>
<action method="addItem"><type>skin_css</type><name>css/custom. css</name></action>
<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
OR
<action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>
<action method="addItem"><type>skin_css</type><name>css/custom. css</name></action>
fetch top 3 bestsellers products programmatically
Mage::getResourceModel('reports/product_collection')->addOrderedQty()->addAttributeToSelect('*')->setPage(1, 3)->load();
Wednesday, June 8, 2016
steps to increase the performance of magento
- Enable Gzip compression
- Combine external CSS/JS into one file
- Disable modules which are not used
- MySQL Query Caching
- Enable Magento caching
- Disable the Magento log
- Image Optimization
set different themes for logged in users or set different themes on runtime
if(Mage::getSingleton('customer/session')->isLoggedIn())
{
Mage::getDesign()->setPackageName('packagename')->setTheme('themename');
}
{
Mage::getDesign()->setPackageName('packagename')->setTheme('themename');
}
Subscribe to:
Posts (Atom)
Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2
Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...
-
Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...
-
The Frontend Properties is used to specify how an attribute can be used in your store. Properties Description Use In Quick Sear...