Magento Themes and Magento Extensions

Adding Custom Attributes to the Manage Products Admin Grid

Share
Posted on March 7th, 2013 | Posted by admin

In magento: I was asked by a client if I could add a custom attribute to the admin manage products grid/list. They were spending a load of time clicking into each product just to see the attribute. Here is how I added it to the grid.

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

At around line 62 add the attribute you want to select to the collection:

Magento – Add Custom Category Attributes

Share
Posted on March 4th, 2013 | Posted by admin

Add Custom Category Attributes in Magento
A client wanted to add a description to each of his product categories, such that the first built-in description would be above the product listing, and the second description would be below the product listing.  Rather than have them create static blocks for every category, it was obvious that I’d have to create a new category attribute.

Fortunately, I stumbled upon one possible solution.  The method doesn’t involve creating a full-blown module, rather, just a few database modifications using phpMyAdmin.

Magento – Accessing Custom Product Attributes in the Cart/Checkout Area

Share
Posted on February 9th, 2013 | Posted by admin

For some reason, I always tend to run into this problem and I forgot the solution I previously implemented. Sometimes, you Magento site will have custom product attributes that you’d like to be viewable from the cart/checkout areas. For performance reasons, the product available to the order/quote doesn’t contain all of the attributes.

Instead of querying the product new to retrieve the attributes, you can instead define what attributes you’d like to be loaded during the cart/checkout process within the a config.xml file. The structure will be as follows:

Magento – Adding Custom Category Fields Attributes

Share
Posted on January 14th, 2013 | Posted by admin
  • How to add new custom category attribute in Magento
  • Magento add category attribute
  • Magento add custom field to category
  • Add category attribute magento
  • Add custom search fields in catalog search in magento
  • How can i create an entity attribute in magento

You know in Magento backend, you can add new product attribute easily which allow you to extend and add more product information. So here I will show you how to add new category attribute – same way Magento did with product attribute.

Before going into detail, you should be noticed that Magento use EAV database which build based entity (product, category, customer,….) so in order to add a new “field” you will need to add a record EAV for the entity you are working with.

By mysql setup file, I mean the file inside the directoryYourNamespace/YourModule/sql/yourmodule_setup/

Adding Custom Customer Attributes

Share
Posted on January 2nd, 2013 | Posted by admin

If you you ever have a need to extend the customer profile within magento and add additional attributes to it, here is a good explanation on how to accomplish that.

In the example below, we will add hidden attributes which will later be used for importing clients and passwords from another system into Magento.

To do this, we need to create a separate module and we will use the MCorner namespace for it.

  1. Create NAMESPACE folder under app/code/community/MCorner
  2. Create module folder “CustomerAddCustomAttr” as we will use this one as the name of our module
    • app/code/community/MCorner/CustomerAddCustomAttr
  3. Create Folders
    • app/code/community/MCorner/CustomerAddCustomAttr/etc
    • app/code/community/MCorner/CustomerAddCustomAttr/Model/Resource/Eav/Mysql4
    • app/code/community/MCorner/CustomerAddCustomAttr/sql/CustomerAddCustomAttr_setup
  4. Create the config.xml file
    • app/code/community/MCorner/CustomerAddCustomAttr/etc/config.xml
  5. Inside the config.xml file copy and paste the code below:
Page 1 of 212»