Blog

How you could serve static content files from your Magento extension folder

How you could serve static content files from your Magento extension folder

As a part of my personal ongoing “unobtrusive Magento extensions” campaign. I will show you another “hack”/approach you can apply in order to squeeze your static files under the main extension folder.

When I say static, I am mainly referring to images, CSS and JavaScript in this case.

For example, imagine you are coding an extension called “Sociable“, which will display several links to various web services like Twitter, GoogleBuzz, etc. Links that you can click and the publish a short message about a product/category on that web service. Something like on the image shown below. Logical question is, where do you store your images?

Read more

How to add an external javascript/css file to Magento?

How to add an external javascript/css file to Magento? © image by mauricesvay left @flickr

Have you ever had a need for adding external files into your Magento layout?
If you had then you know that you cannot do that from your xml layout files using methods/action:

<action method="addJs">
<action method="addCss">
or
<action method="addItem">

You could do that by hard-coding your “head.phtml” file, but then those external files will be loaded on all Magento pages.
This simple extension will provide you easy access for adding/removing external files such as JavaScript or CSS, libraries from remote servers which you cannot or don’t want to put on your server.
I called it Inchoo_Xternal extension.

Read more

Logging user/customer actions in Magento

Logging user/customer actions in Magento

Recently I wrote a Magento extension called ActionLogger, inspired (thematically) by the “Logging of Administrator Actions” feature available in Magento Enterprise. ActionLogger is pretty simple extension, working on pretty simple but powerful concept of Magento controllers predispatch action.

All you need to do is to create event observer/observers for “controller_action_predispatch” event. This event is fired on every controller action call.

Read more

Magento code library – Handling files and folders

Magento code library – Handling files and folders

Among most often custom coding tasks are usually those related to some import/export between Magento and other system. Usually existing store owners when switching from their current shop system to Magento want to transfer all of their products, orders, and most importantly customers.

Most of the time, standard Magento product/customer import/export is not sufficient for the task at hand. Limitations like file size upload and structure of original data require you to do a custom scripts that will handle the job of data transfer. Think of shops with several tens of thousands of orders, customers, products.

Read more

How difficult is Git branching?

How difficult is Git branching?

Well, in short – it isn’t! But, when it comes to branching, it comes to “merging problem”. I say problem although it isn’t, and if you’re interested, I’ll show you why.

Read more

Our New Design is Nominated for CSS Design Awards

Our New Design is Nominated for CSS Design Awards

Hi Everyone,

After all the work we have done to get our new website up and running, we are now trying to get the attention of the design community and show that we do design in the same way we do development; with distinctive passion and quality. If you want to help us to win this award, all you have to do is to go to cssdesignawards.com hover the image and vote for us!

Read more

Basic Git usage from console

Basic Git usage from console

Hi! Today I’m going to write an article about basic Git usage in practice. I’m not going to go into depth of Git repository setup, but rather on developer’s side – what’s important to understand to start using it?

Read more

New Inchoo.net Design

New Inchoo.net Design

Hi Everyone. Since I started working at Inchoo – in fact since my interview, Tomislav (our CEO) has been talking about the revamping of Inchoo.net. In Brazil we have a popular saying: “In a blacksmith’s house, the skewer is made of wood”, which can be applied to almost all types of businesses. You know the drill, unless something is really hurting, we keep our non-billable projects on the back-burner and keep the focus on our clients and opportunities for new projects. Thankfully, we found a gap in between projects and I was the designer responsible.

Read more

Zend framework coding style standard

Zend framework coding style standard © by rodolfoclix/sxc

Hello again! Today I’ll discuss some of the basic coding rules if your’re using Zend framework (or even Magento, which is written over Zend framework). Some might think that this is an redundant topic, but I strongly disagree – if you work in a team.

Read more

How to limit web services so they don’t kill CPU

How to limit web services so they don’t kill CPU © by groenmen/sxc

Hi! As any developer, I’ve encountered a small problem when working with PHP under Apache. It’s all good until you have to test the “real life” situations. For example – if you use imagemagick library in your application. It can get quite heavy on server load. So if you want to read a solution for it, read on.

Read more

Memory management in Zend framework

Memory management in Zend framework © by rodolfoclix/sxc

Hello everyone! Recently I’ve noticed that some developers don’t pay much attention to memory management in Zend framework. And here I’m not talking about Zend_Cache, but rather about object sizes. And if you’re thinking that I’m writing nonsenses, let me show you how to reduce memory usage by more than 100 times (in my example :D).

Read more

MySQL transactions in Zend framework

MySQL transactions in Zend framework © by jrdurao/sxc

Hi! Today I’m going to explain a part of Zend framework DB functionality. Transactions in general are quite useful, like temporary tables, but in most of situations unnecessary. Because of that, I’m going to explain when and how to use them through Zend framework.

Read more

Layout of your custom controller in Magento?

Layout of your custom controller in Magento?

When you work with custom (your own) controllers in Magento,
either frontend or backend, you will probably also use existing blocks and models or if needed write your own classes.
But what happens if you want to or have exigency to move/remove common blocks?
Can you really “design” your own page view without touching Cascading Style Sheets?

Read more

Dynamic grids anyone?

Dynamic grids anyone?

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.

Read more

PhpStorm IDE overview

PhpStorm IDE overview

Developing sites and applications demands the best tool you can afford. PhpStorm is by far the best friend you can get when dealing with web development. Here’s why.

Read more

Programmatically change Magento’s core config data

Programmatically change Magento’s core config data

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.

Read more

1st Inchoo Learning Day

1st Inchoo Learning Day

Check our images on FlickrWe’re hoping to start a new tradition with the event we organized today. 1st Inchoo Learning Day took place in Zlatna Greda, Croatia where the group of geeks (Inchooers) gathered to discuss and learn about programming best practices. The idea is simple. We will take one Friday every two months to go somewhere in the nature and spend a day working on education and knowledge sharing.

We knew it will be a fun event, but we weren’t sure if it will be as useful as we hoped. Now, few days after, things are clear. It was a great thing to have a day like this where developers will move away from computers and share knowledge between each other.

Read more

Git vs SVN A.K.A. Everyone likes control

Git vs SVN A.K.A. Everyone likes control

Hi! Today I’ll try to make an objective overview of both SVN’s and Git’s pros and cons from developer side. I won’t go into depth of configuration of any of them neither will discuss specific commands, but rather functionality itself.

Read more

Magento LightSpeed Extension – Review

Magento LightSpeed Extension – Review

In the last 7 years of my involvement with web development I have had an opportunity to open a great number of different “boxes“ when looking for web site improvement. After opening these “boxes” things often didn’t seem as it was specified – luckily this is not a case with Magento Lightspeed extension : )

Read more

The principles of SOLID programming

The principles of SOLID programming

Hello there! Today I’ll be explaining The principles of SOLID programming. When I first got serious about OOP, I jumped to design patterns, but then I realized that everyone need a good grasp of the SOLID principles before you’re ready to tackle Design Patterns – in more of an Architect role – that is. So, to conclude this short introduction, I’ll try to explain this in as low-level of knowledge as possible.

Read more