Handling clients: My goodbye email to a client

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

In 2011 I, was trying to establish my own business and to build my own company (Cecko’s Lab). I was taking baby steps and I was really bad at handling certain business situations. The “developer me” dominated the “entrepreneur me” and I cared more about to deliver “the best code ever”, but I was overlooking something very important – building / finding healthy business relationships.

In 2011, I convinced that I could handle situations if I could write quality code and at the same time handle continuous communication with clients. Well, when I look back I see that I had overestimated my capabilities. I lacked the maturity that I have now but when I look at the email archives I actually feel very happy how I’ve handled some clients.

Below I will share the “goodbye letter” that I sent to one of my first serious clients. The payments from this client were really good but I couldn’t handle the communication with him and he was a bit too much controlling for me. I tried to maintain strong business boundaries but after 1-2 weeks he found a way to violate them. After 3 months of working with him, I had a good amount of money but I was totally exhausted, and this was affecting my personal life, so I had to put an end to it!

I wanted to do it in professional way, so I read blog posts about “How to say goodbye to a client?”. What I understood was that I should be direct and point the most significant reasons why I wanted to stop working with particular client, to suggest how he or she could improve and if we were separating on good terms, then suggest somebody who could replace me.
Continue reading “Handling clients: My goodbye email to a client”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Magento: Add column index from upgrade scrip

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

During the last few weeks I’ve been having a lot of fun with my current project. Recently I had to invent SQL queries in order to fetch data from the database. “At the end of the day” I had a nice looking-query but it was really slow. The query was taking around 1.2 sec to execute but it was really simple and had to be executed in a production environment every 30 minutes. By our standards, we couldn’t allow such a slow query on a Magento production shop. In addition, I will say that the query was executed on a table where we had many insert and update queries while the customer was interacting with the Magento frontend.

After a short investigation I found out that adding and index to a column that I was using in the where clause reduced execution time from 1.2 sec to 0.02 sec. The good news was that the table to which I wanted to add the index was part of our own module (not part of a core or community module) and I had the freedom to add this index without doing any “harm”.
Continue reading “Magento: Add column index from upgrade scrip”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Zend Framework 2 – The Next Revolution in the World of PHP

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

When I first encountered the Zend Framework I was blind-sighted by the high level of abstraction, the clean code and the rich library. I was 18 years old then, and my OOP knowledge was limited to developing simple websites that utilized a couple of classes + Smarty. In theory, I knew everything about OOP but I had no conceptual idea how to take advantage of the power of this technology – I had only heard using classes and objects was cool. Zend Framework has played a major role in my professional development and has managed to completely shift my worldview, transforming my then idea of coding into something quite different. Zend Framework has taught me to think object-oriented.

Every coder, who is familiar with OOP in theory (but not, for instance, with design patterns), has the illusion that they have no need for community-wide approaches, that they are great and have no need to learn from anyone else. This is what I see in almost every PHP coder nowadays. Before I came across ZF, I too was a bone-headed beginner.

Let me describe а project which does not utilize a framework: it has a single class, often named either Main or Core, and contains various methods – from database connections to product information retrieval, to as far as user registration. This is the Mothership. It is thus often the case that the Mothership includes over 10,000 lines of code, and is the author’s ultimate pride. Some programmers measure their… lines of code, but in the source code, quantity != quality.

The transition from this obsolete style to object-oriented thinking can be very difficult (utilizing a couple of classes does not make your project object-oriented but rather an object-disoriented one).

When I found out a year ago that a new version of my favorite platform was under way, I was more than sure that there’d be a ton of new stuff to learn and I had the feeling that Zend was going to change the world of PHP once again.

So, what was wrong with Zend Framework 1?

Although I have very sentimental feelings toward ZF, I cannot ignore the fact that there are a lot of things in it that I dislike.

A clumsy module system

The module system inside Zend Framework was added at a later time. In earlier ZF versions no attention had been paid to modules, which meant that the module option was fitted in afterwards. Many important options had been omitted such as module configuration and a configured classes-loader. All these things were not that difficult to mend but they did get on people’s nerves.

Continue reading “Zend Framework 2 – The Next Revolution in the World of PHP”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Can’t Imagine Life without Dependency Injection – Part One

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

There are two types of programmers in the world of PHP. The first is the curious, the knowledge-seeking type attempting the most elegant and clean solutions of development issues, who strive to create a harmonic picture of code that evokes admiration, and not an infinite torture of the soul. The second is the indolent type, always pressed for time, who experience coding as if it were a sort of mining activity. In the source code, however, quantity != quality. In time, I have realized that in this realm the moment never comes when you can say “I am ready! There’s nothing more I can learn!” New methods and approaches are continuously developed that aim to make life easier for the programmer.

Recently, there’s been more and more talk in the PHP community about Dependency Injection (DI) – and there’s a reason why. In my own judgment, the development of Zend Framework 2 and Symfony 2 has significantly increased the popularity of Dependency Injection (in PHP) and has shed light on the importance and great advantages of this design pattern. Despite the numerous blog articles, PHP coders still seem to shun this approach. Below, I will try to explain my understanding and implementation of DI.

So, what exactly is Dependency Injection?

Dependency Injection is a design pattern. A lot of people are unable to tell the difference between Dependency Injection and Dependency Injection Container. Now I will try to elucidate DI, and I will discuss DI Containers further down.

Continue reading “Can’t Imagine Life without Dependency Injection – Part One”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Magento: Check if product is already in cart

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

This morning I was looking for some new and interesting articles and I found one titled Are You Giving Your Users Positive Feedback? In this article I’ve found one very simple and elegant solution of something that always bothered me while shopping online. As I’m impatient person I always have problems with clicking more than once on the add to cart button and few times I’ve purchased items in bigger quantity that I’ve intended. I’ve never seen a web shop, that offers this simple solution presented in the article I’ve read – adding message for items that are already in the shopping cart.

 grid view  mockup showing added to cart products
Continue reading “Magento: Check if product is already in cart”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Magento: Free shipping for registered customers in combination with OneStepCheckout

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

In my last project, I had to deal with the following task: All registered customers and all guest customers who tick the “Create an account for later use” option on the checkout page to get free shipping in combination with the OneStepCheckout extension of Magento. This was the first time I had to manage a task of the kind, and in situations like this, I first decided to ask Google for help.

And I came across this page: Free shipping only for registered users where Srdjan Bajic had provided a solution. As I mentioned at the start, this should work with OneStepCheckout and now I am going to show you how I implemented it in OneStepCheckout.
Continue reading “Magento: Free shipping for registered customers in combination with OneStepCheckout”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

PDF Font embedding problem in Magento / Zend Framework

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Have you ever had problems with custom fonts embedding, while trying to generate PDF ducoments in Magento or using Zend Framework. May be I found solution for you, If you get next error message:

This font cannot be embedded in the PDF document. If you would like to use it anyway, you must pass Zend_Pdf_Font::EMBED_SUPPRESS_EMBED_EXCEPTION in the $options parameter of the font constructor.

As a result of my research I decided, that the problem comes from Zend Framework core and seems, that it doesn’t recognize correctly if your custom font can be embedded if has some embedding permissions.

What I mean, when say embedding permissions:

  • Licensed for print and preview embedding
  • Licensed for editable embedding
  • Licensed for modification

Continue reading “PDF Font embedding problem in Magento / Zend Framework”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

1 year Cecko’s Lab

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Really busy 3 weeks for me. I had no day off, even in the weekend I worked hard, some sleepless nights, but found time to prepare something for the 1 – st birth day of domain name ceckoslab.com ( That’s the way to enjoy Palma de Mallorca ) 😛

Let me summarize what happened in the past year:

Evolution:

Thanks to @tomislavbilic who reminded me, that I don’t have favicon.
@ceckoslab has faviconless website :) ;P
Continue reading “1 year Cecko’s Lab”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Magento: Translate untranslatable labels in admin area

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

During the last 3 weeks I’ve had to write a couple of modules that work in the Magento admin section. From here, I got the idea to write a series of short articles about the things I learned during this period.

Quick Overview

I’ll begin with an article that describes one way of translating the labels of some of the form fields in the admin section, which are generally not subject to translation from a CSV file or the Magento inline translation system. I decided to pack my idea into a module that, if you want, you can download and use for your own purposes.

Download: CeckosLab_UntranslatableAdmin

I found another approach, that solves the same problem. You can check it on Inchoo.net blog and the articles is written by Ivan Galambos: How to translate form labels in Magento’s Admin Area …. check it, because it is possible this approach to be more useful for your needs 😉

Personally, when working in the admin section, I prefer to have the interface translated into the default language, i.e. English. My client, however, said he’d like the interface translated into his own language.
Continue reading “Magento: Translate untranslatable labels in admin area”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone