Usage of database stored procedures

Share
Posted on April 19th, 2011 | Posted by admin

Hello guys. Today I’ll try to explain 2 things. First WHY to use stored procedures. And second, HOW to use them. First of all, a small notice. I’ll explain the subject on PostgreSQL example, because of the fact that I used that language syntax most recently.

So let’s begin with the question “Why?“.

Depending on the client’s needs and his limitations sometimes you need to use them to decrease the number of queries to a minimum. An example of that is if you have a situation of network overhead, stored procedures come in handy to minimize the network traffic. Or on the other hand, sometimes you just need to move some of the database logic to a DB side. A good example of that would be if you have a “Cron job” that will clean (truncate) some of the database’s tables.

Magento’s database layout and its EAV structure

Share
Posted on April 18th, 2011 | Posted by admin

Greetings fellow developers! Today I’ll try to explain the principles of EAV system and Magento’s implementation of it. This is a tutorial / explenation for beginners, so please be patient and even try to draw the logic on a paper if you don’t understand it. A small notice before we start. I won’t use specific SQL query examples since this will be a simplified example of principles of the EAV.

Contact Form in Magento

Share
Posted on April 18th, 2011 | Posted by admin

As you know, Magento has a built-in contact form that can be used for general contacts. That form isn’t part of any CMS page, you cannot edit some introduction text, you cannot add phone numbers administration, and you cannot see the breadcrumbs. If you wish to edit text in that default contact form, you will need to update front-end files. Luckily, there is an alternative.

Note:You might notice that this is one of our oldest posts. Upon writing we made one error in the code that was never corrected. Now, this post article is updated and we have fully working instructions. Hope this will help.

If you are a developer, editing your contact form HTML is an easy task. You only need to open file:
app/design/frontend/default/[yourtheme]/template/contacts/form.phtml and you will find your way around.

Explaining the Sitemap SEO Myth

Share
Posted on April 18th, 2011 | Posted by admin

It seems to me that the most common SEO misconception that occurs is the one regarding the sitemap. I often see discussions on business forums about SEO and a very common advice people get when they ask what to do to improve their website’s SEO is to submit a sitemap to Google.

First of all, you need to understand that the term sitemap usually refers to two very different things:

  1. XML Sitemap
  2. HTML Sitemap

In their essence, they are basically the same thing. They contain the same data structured for different purposes. XML Sitemap is the one you submit to Google through the Google Webmaster Tools. HTML sitemap is supposed to be used by actual users, not just bots.

Basic folder structure for new Magento Extension

Share
Posted on April 17th, 2011 | Posted by admin

When I had first contact with Magento platform, I had to create a custom module for it. I thought to myself – how hard can it be? How wrong I was… I didn’t even know where to start…

Anyway, as I already knew the principals of MVC (Model – View – Controller) architecture, and had fairly good knowledge of object orientated PHP, all I needed was the basic file/folder structure for my custom module.

Just a small notice before I start: there are numerous tutorials / blog posts that explain the contents of those files, and therefore I won’t go into that.