Magento Themes and Magento Extensions


Posted on January 30th, 2015 | Posted by admin

Magento’s use of data models provide a great way to access and modify data. Using aptly named methods and clever abstraction, Varien hide away the complex SQL needed to perform data operations. While this makes learning models easier, it often impacts the speed of the operation and therefore the responsiveness of your site. This is especially true when saving models that use the EAV architecture. More often that not, this cannot be avoided, however there are some situations where executing direct SQL queries would be simpler and much quicker. An example of this is updating product prices globally in Magento. It would be easy enough to write some Magento code that looped through all products and modified the price. On a large data set, saving each individual product can take a long time and therefore make the system unusable. To combat this, it is possible to issue a direct SQL query which could update 1000′s of products in 1 or 2 seconds.

Database Connections In Magento

By default, Magento will automatically connect to it’s database and provide two separate resources which you can use to access data: core_read and core_write. As you can probably guess, core_read is for reading from the database while core_write is for writing to the database. It is important to ensure that you use the correct resource when reading or writing data to the database, especially when writing custom Magento extensions that will be released into the wild.

How to Manage Product Attributes in magento

Posted on January 29th, 2015 | Posted by admin

How to Manage Product Attributes in magento

Clicking on the [Create New Attribute] button will allow you to add attributes to your products:

How to Manage Product Attributes in magento

Once you are ready with the attribute, click on the [Save Attribute] button. Then you can click on the [Save] button in order to store your product information. Finally, you need to assign the new product to a chosen category:

How to create magento theme?

Posted on January 28th, 2015 | Posted by admin

Creating new magento theme:

1.      Download and extract magento files from

2.      Copy all the content to the folder that you are current making the theme.

3.      Create database and run sample data.

4.      Run config and choose corresponding database that was created

5.      Login admin panel, go to sytem >> configuration:  in design tab and fill the package as “default” and fill theme default as current theme. In Web tab, choose homepage for the theme (creating a blank page from cms page)

6.      Install the extensions for theme, including: themeframework, bestseller, featured product, slider widget,… into the theme

7.      Install extension setting for theme by following instruction at our later tutorials.

8.      Clear cache and run the theme again.

Creating Custom Shipping Methods In Magento

Posted on January 26th, 2015 | Posted by admin

In this tutorial, we will use Magento’s powerful shipping-method code abstraction to create a shipping carrier. We will create three shipping methods that provide a fixed shipping price, allow for free shipping promotions, define logic based on an item’s weight and, finally, make it all configurable in the admin panel.

We will cover the following:

  • Extend the abstract shipping class and implement the required methods.
  • Make the shipping method configurable in Magento’s admin panel.
  • Work with promotions to allow for free shipping.
  • Allow tracking codes to be set against an order.

An Error Occurred While Saving The URL Rewrite in magento

Posted on January 23rd, 2015 | Posted by admin

In one of our recently projects, I got the following issue when I tried to reindex Catalog URL Rewrites index: “An error occurred while saving the URL rewrite”

An Error Occurred While Saving The URL Rewrite in magento

After spending time to debug the issue, I came up with file app/code/core/Mage/Catalog/Model/Resource/Url.php and I could see the error in saveRewrite() function.

I echoed the real error message, I found out that issue is because the system could not insert a duplicated record. So something was wrong with “core_url_rewrite” table.

I fixed the issue by logging into phpMyadmin, find that table and truncate all records (do not worry about this because all URL rewrites will be generated again when you reindexed).

Page 1 of 3123»