How to setup Magento store on your PC

If you going to start working on Magento (e-commerce package) then you can do the following steps and you will have your store ready in a jiffy.

1. First download the Magento e-commerce software from

2. Click on Download and you will be taken to

3. If you would like to register on the website then you can fill in the form. This will also help you to post questions on their forums should you require any help. As this post is mostly concerned with setting up your store then you can just click on “No thanks, take me to the download page”.

4. You will find several download options. We are concerned with the Full Installer here. Select the download file from the drop down and click on Download.

5. Please remember to make sure that your system fulfills the prerequisites mentioned on the following page:

6. Once the above steps are complete, you can start by opening the index.php file at the root and add the following line at the start of the file


7. This step is not necessary however on some systems I have seen that Magento takes a long time installing the database due to which script time out may occur. Magento has commented out DROP TABLE lines in the SQL that is executed while installation. So, it’s a good idea to do a Find-Replace as follows


Replace with : DROP TABLE

8. Now, you can run the index.php file in the browser and the installation process will start. You will be asked database related information, admin user information etc. which you can enter easily. The whole process will be complete in a couple of minutes and then you can browse your store.

9. On some local systems you may have a problem in logging into the admin panel. You can find the fix here

Hope the above helped. If you need any sort of help then do let me know.

How to setup Zencart TEXT attribute for your product

Zencart provides you option to display attributes of your products on the product info page. You can display attributes in radio button, checkbox, dropdown etc controls.
Zencart also provides you the option of displaying text boxes where you can take input from the customer and you can charge the customer for it. This is a good option
but sometimes it does not work as intended due to corrupt template files or conflict due to other modules.

Here I will try to add a TEXT attribute and associate it with a product and then list the most common problem associated with it

If you would like to use TEXT attribute in Zencart please do the following steps

1. Click on Option Name Manager in the Catalog menu

2. Add the option name and select TEXT from the drop down

3. After saving it proceed directly to the Attribute Controller page. Remember we do not need to add any value to the TEXT attribute on the option value manager page.

4. Select the product against which you would like to add the TEXT attribute. The in the Option Value drop down you should see TEXT [RESERVED FOR TEXT/FILE ONLY ATTRIBUTES]. Select it and add the price against it.

5. Click on Insert button and you should see the TEXT attribute against that product on the page.

If you see the TEXT attribute against the product which you have added and it is calculating the price of the product as well as the attribute on the shopping cart page then your system is working correctly and you have nothing to worry about.

If not then you should do the following steps

1. Run the following statements on mySQL or in the Zencart Install SQL patches

INSERT INTO `configuration` VALUES ('', 'Product option type Select', 'PRODUCTS_OPTIONS_TYPE_SELECT', '0', 'The number representing the Select type of product option.', 0, NULL, '2007-03-19 17:57:39', '2007-03-19 17:57:39', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Upload prefix', 'UPLOAD_PREFIX', 'upload_', 'Prefix used to differentiate between upload options and other options', 0, NULL, '2007-03-19 17:57:39', '2007-03-19 17:57:39', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Text prefix', 'TEXT_PREFIX', 'txt_', 'Prefix used to differentiate between text option values and other option values', 0, NULL, '2007-03-19 17:57:39', '2007-03-19 17:57:39', NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Image Handler Version', 'IH_VERSION', '2.0', 'This is used by image handler to check if the database is up to date with uploaded image handler files.', 0, 100, NULL, '2007-06-06 16:47:03', NULL, 'zen_cfg_textarea_small(');  

2. Run the following statement if you don’t see the TEXT [RESERVED FOR TEXT/FILE ONLY ATTRIBUTES] in the Option Value drop down on the Attribute Controller page

INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');

After running the above SQL statements you should be fine and everything should work correctly. If you still face a problem then do let me know.

How to display state/province dropdown instead of input box in Zencart

In the default Zencart template the customer is asked for his State/Province by entering the value into the text box. However, mistakes can happen at any time and the customer may mistype the name. Zencart checks the name against the zones input in the admin panel. If it does not match Zencart flags an error and the customer has to retype it thus causing frustration which may lead to lost sales.

The way to go is display the State/Province in a drop down so the customer has to just select the name in the drop down and continue with the checkout process.

To do that you need to open the includes/modules/create_account.php file and go to the end of the file where you will see the following line

 $flag_show_pulldown_states = ((($process == true || $entry_state_has_zones == true) && $zone_name == '') || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input) ? true : false;

This is code which determines whether or not to show the drop down. Now you can either confirm that all the conditions are true or take the practical (aka shorter) route and comment the line and add the following code on the next line. So the above line would look like

// $flag_show_pulldown_states = ((($process == true || $entry_state_has_zones == true) && $zone_name == '') || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input) ? true : false;

$flag_show_pulldown_states = true;

Now if you run the register page you can see that the dropdown will show.

Hope the above helped.

How to specify canonical page for Google

If your website has some pages which have highly similar content then that may prove detrimental to your SEO efforts. How you may ask?

Take for example the following 3 URLs

As you may notice the page is the same in all 3 examples. Assume that the main function of the page is to display listing of products and the querystring parametres just change the order of listing of those products and Google indexes all 3 variations in its search engine.

With 3 variations of the same page indexed i.e. the main content of the pages being the same the said page will not rank high on Google as it may see that the page has nothing new to offer to the visitor. Even when things have changed now and Google says that its algorithm will display the correct page with respect to the search terms its better to play safe.

Google gives you the option of defining your canonical page. A canonical page is the preferred version of a set of pages with highly similar content.

If you take the above example of you can define the first page as the canonical page. To define it as such, open the page and go to the <head> section. Please the following line in the <head>

<link rel="canonical" href=""/>

Now, Google will know which page to treat as the canonical page i.e. the page to consider in its search results.

To read more you can view the following page on Google regarding canonical

Hope the above helped.

How to add and display banners in OsCommerce

One of my clients wanted to show banners on his OsCommerce website home page. He said that he wanted to display the hot selling products on his home page so that customers can go and buy them in the shortest time possible. Not only that he also wanted the facility to upload and change images as quickly as possible.

So I got down to implementing it on the website. Now, unlike Zencart, OsCommerce does not have default banner code on the home page due to which I had to dig a bit deeper. Finally I found the function which displays the banner and that is

<?php echo tep_display_banner('dynamic','BannerGroup'); ?>

where you can add the group name for your banner(s) in place of BannerGroup. dynamic tells the system to randomly select a banner from the BannerGroup and display it. This will help the client to create more than one banner in the same BannerGroup and the system will take care of the rest.

Hope the above helped

Happy Birthday Pakistan

Pakistan is today 62 years old. The air in Karachi is festive with people outside with their families looking at all the lightings and decorations in the city. Biker boys have removed their silencers and are going at full throttle.

Flags are everywhere on cars, bikes, apartments, houses, buildings. Some people say that such festivities for one night are not right but hey it comes once a year and better to enjoy it than think what should have been.

I bid happy independence day to you from me and all over Pakistan.

Remember Pakistan and me in your prayers.

Pakistan Zindabad

Hey the fireworks have started! Yipee

How to motivate yourself

I use the following points to motivate myself whenever I feel down. Hope it helps others.

1. Follow a path to achieve your goal and stick to it.

2. Never quit what you have started.

3. Find friends or partners of similar interest.

4. Learn how to teach yourself.

5. Do something which is more in line with your talent and interest.

6. Dig deep in the subject which you find interesting.

7. No risk no game.

If you follow the above points to the core then you will never feel down and out. Remember you can be your biggest enemy so stay focused on the work and you will never be lost

English quotes on success

The person who gets the farthest is generally the one who is willing to do and dare. The sure-thing boat never gets far from shore.

Everyone who got where he is has had to begin where he was.

The gem cannot be polished without friction, nor man perfected without trials.

It is our attitude at the beginning of a difficult task which, more than anything else, will affect it’s successful outcome.

I am still determined to be cheerful and happy, in whatever situation I may be; for I have also learned from experience that the greater part of our happiness or misery depends upon our dispositions, and not upon our circumstances.

To be a great champion you must believe you are the best. If you’re not, pretend you are.

Finish each day and be done with it. You have done what you could. Some blunders and absurdities no doubt crept in; forget them as soon as you can. Tomorrow is a new day; begin it well and serenely and with too high a spirit to be cumbered with your old nonsense.

First we form habits, then they form us. Conquer your bad habits or they will conquer you.

Goals allow you to control the direction of change in your favor.

There are three ingredients in the good life: learning, earning and yearning.

Online ticket and eSupport systems

We have a lot of clients at the company I work for and our client services department in the UK used to get a lot of phone calls and emails regarding support issues on their websites. Now, the issues weren’t major or critical and most of the time they would require just 5 minutes to resolve but our client services got bogged down as they had to cater to receiving issues from clients, understanding them and then sending them to the right person in our creative services department who would then resolve it and update the client services department and who would in turn inform the client.

So, if a client had an issue that would require 5 minutes to resolve it would in effect take 4-5 hours which was a loss of time and the time which could have been used for solving the issue was being wasted in countless forwarding of emails. Not to talk of the number of emails that increased for the poor client services department and their workload increased manifold.

To resolve this, the company had a video conference and we all sat down together in which we identified the issue and decided on finding a solution that would resolve this once and for all. After some searching and initial enquiries, we decided on Kayako. The price was right and the software really helped us 100% to resolve our problem. We are using the Kayako Support Suite in our company.

Now, our client just has to send an email to the web support email address and it automatically gets routed to me. I then identify the issue and if we need further information from the client we resend it to the client otherwise we resolve it and inform the client. The client does not have to email or phone our client services department at all. If a particular ticket is not resolved to my department I forward it to the relevant department and then they update the client of its status.

Kayako has truly helped us improve our client response time and now a 5 minute issue of the client takes that long YES 5 minutes.

I have come across another ticket system in the open source domain OsTicket. I have downloaded it and going through the features it provides. It is a stripped down version of Kayako but as time goes by I believe it will definitely give Kayako a run for its money :).

Hope the above helped