Magento Themes and Magento Extensions

Magento Extensions Quality Assurance Certification

Share
Posted on July 8th, 2011 | Posted by admin

Ah, what a mouthful. First off all, sorry to disappoint you, as this article is purely result of my imagination. There is no such thing as “Magento Extensions Quality Assurance Certification” (aka MEQAC) at least not at the moment (as to 1/12/2010).

But let’s for a moment imagine there is such thing. Let’s discuss one possible direction of thinking. Let’s discuss the current issues with Magento extensions development.

Seems like Magento’s extremely flexible architecture where you can do almost anything if you are up to the task imposes some serious issues when it comes to general free/commercial extensions you can grab from either Magento Connect or from the developer/company site.

Dynamic grids anyone?

Share
Posted on July 1st, 2011 | Posted by admin

For my second  article I’m again writing about Ext.js. Ext.js has one great part for showing data – grids. These look really nice and you can style them pretty easily. It all works like a charm when you’re using them for static data. But what when things get dynamic? What when you don’t know the number of the headers that you need in the table and not just rows? Here’s where this article will help.

First lets input some data to our view(i used ajax requests). For the request I modeled my json so it has several parts: fields-name of the fields in table, results – data to be shown, and flag – is it input data our output(i had to make a sort of a spreadsheet where input and output data had to be separated.)

Since I used Array store I modeled my data into an array.

Modify “Interface locale” dropdown in administration

Share
Posted on July 1st, 2011 | Posted by admin

It is really cool when you can see large list of languages in the footer of Magento administration. You might think that all those languages you can see are available by default, but that is not the case. What to do when you need only two? English and Spanish for example? What seamed to be a simple task, turned up to be quite challenging.

Mage_Core_Model_Locale_Config has protected property $_allowedLocales containing array of locales that will be used to show language dropdown.

I have failed to rewrite that class, but that would be bad idea anyway, mostly because I don’t have time to spend half day testing if that has any sideefects that I’m not aware of, so here’s what I came up in the end.

How to extend Magento Order Grid?

Share
Posted on July 1st, 2011 | Posted by admin

Here is small example which explains how to modify order grid. Main class for order grid is “Mage_Adminhtml_Block_Sales_Order_Grid”, if you want to add some column you have to rewrite this class (block).

How to rewrite magento block:

1
2
3
4
5
6
7
<blocks>
<adminhtml>
<rewrite>
<sales_order_grid>Inchoo_Test_Block_Adminhtml_Order_Grid</sales_order_grid>
</rewrite>
</adminhtml>
</blocks>

Programmatically change Magento’s core config data

Share
Posted on June 30th, 2011 | Posted by admin

Every Magento installation has certain core configuration data already set. When you update those values from the administration interfaces, changes are saved mainly to core_config_data database table. It seems important and something that you shouldn’t touch, right? As always, there are times you will wish to get your hands on it. In some cases you will wish to chance settings directly from the code. This article demonstrates the proper way.
Let’s say we want to change “demo store notice” (on/off) – change value from 0 to 1 and vice versa.
All you need to do is open your database,
for example with phpmyadmin,
browse table “core_config_data“,