Blog

Improve your development time

If you are developer working on a open source technologies then most likely you are using open source or some freeware tools. Since I’m a PHP developer this post will show examples in context of PHP. Developing for PHP can be quite a fun, or sometimes quite painful.

Read more

Making use of Magento getSingleton method

In one of my previous articles I showed you how to use getModel and getData methods in Magento. Although we should not put those to methods at the same level, since I’d say the getModel is a bit more higher. Higher in sense, you first use the geModel to create the instance of object then you use getData to retrieve the data from that instance. I have said it before, and I’m saying it again; Magento is a great peace of full OOP power of PHP. It’s architecture is something not yet widely seen in CMS solutions.

One of the architectural goodies of Magento is it’s Singleton design pattern. In short, Singleton design pattern ensures a class has only one instance. Therefore one should provide a global point of access to that single instance of a class.

Read more

Retrieving product information in Magento

Shop Supplies Product Info

If you are developing Magento template sooner or later you will need to obtain some product information and rearrange it to fit your template. One of the most useful function while working with Magento is Mage::getModel($modelClass).

Here is how you would use it to retrieve Magento product information Mage::getModel(‘catalog/product’);.

This ‘catalog/product’ relates to app/code/core/Mage/Catalog/Model/Product.php file. If you open that file you will see it’s actually a class named Mage_Catalog_Model_Product. That same class is extending the Mage_Catalog_Model_Abstract class meaning it inherits all of it’s methods.

Read more

Is current WordPress page in the hierarchy of some other?

This topic could be interested for those of you who deal with WordPress theme creations. If you are not one of them, you will not find this interesting at all. Developing a complex WordPress site with many sections with pages may be limited with WordPress standard content structure. Posts are in categories. Categories can have subcategories and pages can have subpages. There are some default functions that help you in identification of which element is child and which is parent. But when we need something more advanced, things get complicated.

Read more

UPS API Quest

I got one fairly simple request to develop a custom shipping calculation for Magento that will use some special calculation using UPS API. Right now, Magento only calculates weight and the client needs something more advanced. I worked on similar stuff before, so I guessed this will not be much different. First step was to find an API for UPS. Well, this post is all about the search for API. I’ll update it when I manage to find it.

Read more

Figuring out Magento object context

One of the problems working under the hood of the Magento CMS is determining the context of $this. If you are about to do any advanced stuff with your template, besides layout changes, you need to get familiar with Magento’s objects (classes).

Let’s have a look at the /app/design/frontend/default/default/template/catalog/product/view.phtml file. If you open this file and execute var_dump($this) your browser will return empty page after a short period of delay. By page I mean on the product view page; the one you see when you click on Magetno product. Experienced users will open PHP error log and notice the error message caused by var_dump().

Read more

Manual creation of Google Sitemap in Magento

Most of you probably know this, but let’s define what the sitemaps are. Sitemaps are a simple way for site creators to give search engines the information about pages on their site that are available for public. Basically, those are just 1 or more XML files that lists URLs for a site along with additional meta informatio about each URL (like last update, how often it changes, its importance relevant to other pages). With this in mind, search engines can be more clever while crawling the site. Click here see how sitemap of this site looks like.

Read more

What makes Magento so hard to learn

Most of us in ecommerce application development have already heard of Magento. Some would call it new ecommerce killer app. I myself stand with that statement for many of reasons. However I would like to call it with one more name, developer killer app. This developer killer is what I literally had in mind. Magento is currently one of the most difficult PHP systems out there a developer could learn and master.

So, what exactly makes Magento so hard? Short answer would be the lack of good, and I mean really good IDE studio. You know, like the one .Net guys and girls have, something like Visual Studio. Yea, here I go again giving praises to Visual Studio and monopolistic Microsoft although I make my living using open source PHP. I should really be a shame, right? Well, no!

Read more

Website Launch Flowchart

Did you ever wonder what does it take to build a successful website? Bob Misita from Virante helps us visualize the process. He made a flowchart of 40 steps that need to be completed before actual website launch. Although the list is quite comprehensive, this steps really occur even in medium sized projects.

I hope this will help all of you who want to build a self-money-generation sites with the deadline of 3 weeks. Look at the flowchart, analyze it and don’t start the development until you planned at least 80% of this boxes.

Read more

WordPress: advantages and disadvantages?

Couple of days ago I posted a question to LinkedIn Q&A. It was for those individuals/companies who use WordPress to run their main site. I was interested to know why do they find WordPress to be their chosen one CMS. The users were supposed to name top 3 key elements in WP that they find most important for your site.  That was the easy part to most of them. Harder part was to name top 3 key elements they miss in WP, but have a feeling it would be important for their site.

There were some really interesting replies.

Read more

Magento upgrade and broken templates

Few days ago I had a task of upgrading Magento ver. 1.0.19870.1 to Magento ver. 1.1.1. When you are doing something like that on your own development machine, you probably don’t care much about backing up your database and installation folder. On my development machine I had a clean install of version 1.0.19870.1 where I merely entered few products, categories and other minor things. I had no other theme besides custom one. Before I was ready to do a update to real, shared, remote development machine I decided to test the update on my machine.

Performing local update went smoothly as it gets. On my surprise, everything work as it should be. I was convinced I can go and make upgrade to remote development machine. I had no SVN setup to my remote machine so all my code transfer was done trough FTP. Basically if you’re performing your upgrade trough full archive file all you need to do is copy content from archive to your root Magento installation and overwrite everything you’re asked to overwrite. Sound’s easy, doesn’t it? Well it is easy and your upgrade should go clean and without any glitch, that is if you are using built in theme. If you’re using a custom made theme, chances are you’re rune into trouble like i did.

Read more

FogBugz – Project Management Tool

Working on a project as only developer having direct contact with the client gives you the freedom not to think too much of a communication tool you will use. Couple of meetings, phone calls and an email will be just fine. After 3-4 weeks, you deliver the project and the communication is over. If that is your common scenario, than skip evaluation of this tool.

Read more