Create Custom Tab in Magento Product Add/Edit Page

Share
Posted on February 27th, 2012 | Posted by admin

If you are trying to add a custom tab to the product add/edit page in Magento admin , then you are at the right place. Today I will tell you a damn simple method to add the custom tab to product add/edit page. We will have to add few lines to the xml layout file of your custom module. Then create a phtml file that contains the html part to be shown in the tab.

Create Custom Tab in Magento Product Add/Edit Page

Programmatically Add Grouped Product to Cart in Magento

Share
Posted on February 27th, 2012 | Posted by admin

Programmatically Add Grouped Product to Cart in Magento

Adding simple products to cart through custom PHP code is pretty straight forward. You just need to call the ‘$cart->addProduct()’ function with the product_id and quantity as parameters. But if you want to add grouped products to cart through your code, you will need to perform few additional steps. The process is very easy – create an ‘$super_group’ array of the associated products with the specified quantities. Then you need to pass the array to the ‘addProduct()’ function. See the actual code below that makes it work:

<?php
//Array for holding the associated products
$super_group = array();

//Id of the grouped product
$parentId = <grouped_product_id>;

I can’t add a product to my wishlist – Magento

Share
Posted on February 24th, 2012 | Posted by admin

I can’t add a product to my wishlist – Magento

One of our clients at the office had a store and the “wishlist” button in the product view wasn’t working.

The products he was trying to add weren’t in the root category.

You must add your products at least to the root category.

Customize ‘New Order’ Email template in Magento

Share
Posted on February 22nd, 2012 | Posted by admin

Customizing the ‘New Order Confirmation Email‘ template in Magento may be a havoc for the first time if you do not know the write way. But it is as easy as anything. Recently I needed to customize the item information in the ‘New Order Confirmation Email’. I googled a number of links but found nothing useful. Then I decided to find my own way, and after 2 hours of hard work I found a simple way. Here are the steps to customize the email template:

1. In the Magento Admin panel go to ‘System > Transactional Emails’ and click on ‘Add New Template’.

2. In the ‘Load default template’ container select ‘New Order’ in the ‘Template’ dropdown. Alse select our desired ‘Locale’.
3. Click on ‘Load Template’. It will load the Default email template to edit for you. Now you can edit the ‘Template Subject’ and ‘Template Content’ to suit your needs. See the following screenshot:

Override Controllers in Magento

Share
Posted on February 22nd, 2012 | Posted by admin

While working in Magento you may sometimes run into situations where you would like to override the functionality of the Magento core controllers. But you cannot edit the core controllers of Magento as it will hinder you from upgrading your Magento version. So we have to find a simple solution for that. Don’t worry, today we will see how to override Magento core controllers.
For this, you have to create a custom module. If you do not know how to create a custom module, then read this post.
Now suppose we want to override the checkout/cart controller. To do this, we will have to edit just two files in our custom module.
Suppose our custom module is present in the namespace ‘Company’ and our module is named as ‘Web’.

Page 1 of 812345»...Last »