Magento E-commerce Platform Q/ A

How to Remove ‘Shipping Method’ Step from One Page Checkout in Magento

Some stores have only one shipping method and it is free so there’s no need to have this step at a checkout. The things you’ll need to do in order to hide this step: 1st set shipping methods settings to free shipping in admin area; 2nd you will need to overwrite block ‘onepage’ and create ‘onepage’ controller. Here’s the example:

 

How to overwrite 'onepage' block:

Add this code below into config.xml file (with this code we will overwrite standard magento block Mage_Checkout_Block_Onepage to Ikantam_Remove_Block_Onepage block):

How to Add New Fields into Order Table in Magento (Admin Area)

Rewrite class: Mage_Adminhtml_Block_Widget_Grid. File is stored here: /app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php

To add new data to the collection, modify method: _prepareCollection as shown in the example below (by doing so, you’ll make the necessary order information displayed on frontend):

Custom Product Sorting Options in Magento

Frequently due to the variety of products available in the catalog it is necessary to add additional sorting options such as sort by brand or color. This is the example of how to add different sorting options to the products. In the below example sorting by products position depending on manufacturer attribute on the category page is shown.

Magento Tables Customization

We perform the actions with products table in the admin area, so make sure to override Mage_Adminhtml_Block_Catalog_Product_Grid block class. Class to override could be found here:

/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php

 

Secured method:  _prepareCollection delivers the products information and displays it in the table.

How to Add a Discount to the Total in Magento?

Quite frequently there is a requirement by the shop owners to add a discount to the checkout totals. You should add a custom total to existing (default) totals collection. The first step is to add this code to the config.xml file:

Magento Customer Account: How to Add a Tab to the Dashboard?

Namespace - Ikantam

Module - KnowledgeBase

224

 

In order to add a new tab and link it to a certain page we need add these lines in the layout (in the example controller is: IndexContoller, and action is - indexAction()):

Magento: Custom Input Types in Custom Options

Magento by default supports about 10 input types for the product custom options. In order to create a custom one first of all it is necessary to add a possibility in Magento admin area to indicate this custom attribute:

File 'config.xml'

How to Add Custom Attributes to Custom Options in Magento

Let us add 'details' custom attribute to Custom Options for select types.

Select options are stored in the tables:

  • catalog_product_option_type_value,
  • catalog_product_option_type_title,
  • catalog_product_option_type_price.

We've added 'details' field into catalog_product_option_type_value table

The installation file comes with:

How to Create E-mail Templates in Magento

To create a custom e-mai template in Magento, you need to specify it in the config.xml file of the module.  Example: Place this code between the tags

Magento Product Ratings and Reviews

There is prebuilt product ratings and reviews functionality in Magento. By default all reviews and ratings should be approved by the store owner via Magento admin panel.

Store users can rate (review) products by clicking the link on the product page.

214

 

At the product page users see the form to leave a comment to the product and rate it by assigning it 1-5 star rating.

215