Reference : http://inchoo.net/magento/adding-a-new-language-in-magento/ Norwegian Nynorsk Language Pack : http://www.magentocommerce.com/magento-connect/magento-community-modules-norwegian-nynorsk-norway-language-pack.html Norwegian Bokmal Language Pack : http://www.magentocommerce.com/magento-connect/magento-community-modules-norwegian-bokmal-norway-language-pack.html
Reference : http://www.daffodilsw.com/blog/integrating-magento-header-footer-in-wordpress-solved
Reference Url :
http://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher
http://www.magentocommerce.com/boards/viewthread/8296/



  • Magento provide support to create own magento log files.It have the function for this purpose in
    • app/code/Mage.php
  • public static function log($message, $level = null, $file = '') {}
  • We just need to call the above function when we need to create log file or storing information in custom log files.
    • For example:
    • Mage::log('My log entry', null, 'mylogfile.log');

Get store data
Mage::app()->getStore();
Store Id
Mage::app()->getStore()->getStoreId();
Store code
Mage::app()->getStore()->getCode();
Website Id
Mage::app()->getStore()->getWebsiteId();
Store Name
Mage::app()->getStore()->getName();
Is Active
Mage::app()->getStore()->getIsActive();
Homepage URL of Store
Mage::app()->getStore()->getHomeUrl();
Current page URL of Store
Mage::app()->getStore()->getCurrentUrl();

All of these functions can be found in class Mage_Core_Model_Store
File: app/code/core/Mage/Core/Model/Store.php
Reference : http://www.techdilate.com/code/magento-get-current-store-details/
Reference: http://www.w3bdeveloper.com/how-to/magento-get-products-from-order-by-order-id-as-array/
Reference : http://ecommerce.eglobeits.com/blog/remove-magento-navigation-links-from-my-account-dashboard/








Coming soon...

To add additional column to your grid and add custom renderer, you need to open your grid block from required module. Let me explain with custom module to add additional column.

My custom module Structure

  • Custom
  • -Sample
  • --Block
  • ---Adminhtml
  • ----Sample
  • -----Grid.php

We need to work on the Grid.php file.This file contains different type of functions to display content in the grid.We need to search _prepareColumns() functions and work on that..

I already contain some columns to display informations.First I will show one from this grid.

For Example : ------------ We have to see how do add image in the admin grid.

Open Grid.php and search _prepareColumns() functions.Now we need to add one column .Paste the following line in this function.

$this->addColumn('image', array(
'header' => Mage::helper('sample')->__('Image'),
'align' => 'left',
'width' => '100px',
'index' => 'filename', // variable name of the image.This field information comes from modal.
'renderer' => 'Custom_Sample_Block_Adminhtml_Sample_Renderer_Image',
'attr1' => 'value1' // We don't use this now
));

I already told about my custom module structure.Now we need to create one 'Renderer' folder within Sample Block folder,and create one 'Image.php' file within Renderer folder

  • Custom
  • -Sample
  • --Block
  • ---Adminhtml
  • ----Sample
  • //Block
  • -----Renderer
  • ------Image.php
  • -----Grid.php
Now open Image.php And add the following files
class Custom_Sample_Block_Adminhtml_Sample_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract{
public function render(Varien_Object $row)
{
$html = '<img ';
$html .= 'id="' . $this->getColumn()->getId() . '" ';
$html .= 'src="' . Mage::getBaseUrl('media').$row->getData($this->getColumn()->getIndex()) . '"';
$html .= 'class="grid-image ' . $this->getColumn()->getInlineCss() . '"/>';
return $html;
}
}
Reference:
  • http://inchoo.net/magento/how-to-add-custom-renderer-for-a-custom-column-in-magento-grid/
  • https://nikunjvadariya.wordpress.com/2013/06/13/magento-adding-thumbnail-image-to-magento-admin-grid-column/

To add additional column to your grid, you need to open your grid block from required module. Let me explain with custom module to add additional column.

My custom module Structure

  • Custom
  • -Sample
  • --Block
  • ---Adminhtml
  • ----Sample
  • -----Grid.php

We need to work on the Grid.php file.This file contains different type of functions to display content in the grid.We need to search _prepareColumns() functions and work on that..

I already contain some columns to display informations.First I will show one from this grid.

$this->addColumn('title', array(
'header' => Mage::helper('sample')->__('Title'),
'align' =>'left',
'index' => 'title',
));

addColumn function create one column with 'Title' title in grid.The following details give the used variable's information.

  • 'title' => column name
  • 'header'=> Column Title
  • 'align' => Alignment of the this cloumn text
  • 'index' => Here i added 'title'.This is not static content. This is one cloumn value of this modal.We displayed title of the particular row's information,here we didplayed retireved information.

Now I like to show additional column.Here we display the description of this row.We already store description to this item.

Paste your existing column action and paste next to the existing column and edit column name to 'description'

$this->addColumn('description', array(
'header' => Mage::helper('sample')->__('Title'),
'align' =>'left',
'index' => 'title',
));

Edit the column title in the header variable in array

$this->addColumn('description', array(
'header' => Mage::helper('sample')->__('Description'),
'align' =>'left',
'index' => 'title',
));

Finally update index variable in array. We used 'item_description' to store the description of the item in table. Now we need to use this name 'item_description' in 'index' variable.

$this->addColumn('description', array(
'header' => Mage::helper('sample')->__('Description'),
'align' =>'left',
'index' => 'item_description',
));

After adding this description column, we can see new column with 'Description' Title in the admin grid.

Reference:

https://nikunjvadariya.wordpress.com/2013/06/13/magento-how-to-add-new-action-in-row-at-admin-grid-in-magneto/

When developing or customizing existing themes,you need to know template path hints for frontend and admin area.

Magento provide default option to see the template for the frontend (enable it via System > Configuration > Developer > Debug > Template Path Hints )

Unfortunately Magento doesn't provide same trick to the admin area.

Here you can see the trick to find admin temaple area with simple custom module

Download and install module from the below links

Download Link

After install custom theme, Clear cache and loggedin admin area again.Then enable template path hint from system configuration,you can view template path hints for both frontend and admin area.

This topic explains about getting category images in the frontend ( category list page ) and resize the image to the given size.

  • Call the below function from your template

  • Override category model(category.php) in the below directory
    • app/code/local/Mage/Catalog/Model/
  • Add the below function in category.php

For example :

We need to override category.php model file of the catalog module

  • Catalog module is placed in the core/Mage directory. Now here override the model file of the category.php
  • Create the following directory and files in local direcoty
    • app/code/local/Mage
    • app/code/local/Mage/Catalog
    • app/code/local/Mage/Catalog/Model
    • app/code/local/Mage/Catalog/Model/category.php
  • Now Open category.php file from this path ( core/Mage/Catalog/Model/ )
  • Copy the content of this file
  • paste copied content in new category file that is placed in this file path( local/Mage/Catalog/Model )
  • Now you can add new action or edit existing action in this model file.
Reference : http://stackoverflow.com/questions/14577006/changing-order-of-shopping-cart-totals-in-magento This site templates : http://www.freshdesignweb.com/free-responsive-blogger-templates.html