Building an online store in php

In this series I’m going to show you how you can create an online store in php. Something like e-bay, or Amazon. But remember I’m just going to show you the basics of creating an online store. Were not actually going to create the next e-bay or amazon.


Things I won’t include

  • Pay-pal integration – I myself have no idea how to integrate pay-pal or any other third party that the clients will use to pay the items that they’re going to buy from the sites.
  • Customized products displayed for clients – We will not be tackling how to display custom products on every client page. If that’s not clear to you, I’m referring to product suggestions. For example, Customer A. Always buys blank dvd’s from the online store. I will not tackle how display the dvd’s on the client page. Something like a shortcut so that the client won’t search for the product everytime he buys from the store. Again, I won’t show you how to do that. But you can do a research and do it your self.
  • Hosting –  I absolutely won’t include this. Since I myself, don’t know how to apply for paid-hosting. And I don’t have a pay-pal account.


Modules were going to create

  • Login system – This would be used by the clients, employees, administrators to login to the system. Privileges for those users will be different from each other. There are limits to what they can do with the system.
  • Inventory– This is would be used by the administrator to determine what products need to be reordered, what products are out of quantity, etc. This also includes managing the product records, updating, deleting, and creating new products.
  • Cart – This will be used by clients to interact with the system. This is the module that they’re going to  use to buy items that are added by the administrator.
  • Purchasing–  This will be used by the administrator to add quantity to products that are below the reorder level.
  • Reports– Will be used by the administrator to gain an insight about what products are sold regularly. And what products are not sold.

On the next part of this series, I’ll discuss about the login system.

How to edit Joomla configuration file

This is just a quick guide on how you can edit the configuration file in Joomla. This is useful when you have recently changed your mysql database password. And whenever you access Joomla in your localhost, it says that it cannot connect to the database.

To edit the Joomla configuration file, just open up the folder where you have installed Joomla. Mine is in:


Then open up the configuration.php file on a text editor.


We are only interested in the final parts of the file. I’ve already commented the important parts that you may need to modify:

var $db = 'joomladb'; //this is the database where all the data used by joomla is stored
var $dbprefix = 'jos_';
var $mailer = 'mail';
var $mailfrom = '';
var $fromname = 'JoomlaTesting';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpsecure = 'none';
var $smtpport = '25';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost'; //host, its usually called localhost. Since the Joomla CMS is hosted on your local computer
var $MetaAuthor = '1';
var $MetaTitle = '1';
var $lifetime = '60';
var $session_handler = 'database';
var $password = '1234'; //password, this is the one that you may want to change depending on your current mysql database password.

How to install Drupal

In this guide I will show you how you can install Drupal on your localhost.

First, you need to download Drupal from their site:

Extract the tar.gz file to your web accessible folder. Make sure you have the index.php on the root of the drupal folder.


Second, you need to make sure that Drupal is really compatible to run on your current web server. In this case, the apache Webserver which came with the installer of wampserver. Which you can download for free at:

At the time of writing of this guide, I have:

    • php –version 5.3.0
    • mysql –version 5.1.36
    • apache –version 2.2.11

Be sure that your wampserver installation complies with the requirements of the Drupal Content Management System. Because it won’t really work properly if it doesn’t meet the requirements.

As a summary for the requirements:

    • MySQL 3.23.17 or higher. MySQL
    • PHP version 4.4.0 or higher for Drupal 5 and Drupal 6, PHP 5.2.5 or higher for Drupal 7
    • Apache 1.3 or Apache 2.x hosted on UNIX/Linux, OS X, or Windows.

The wampserver installer will do, so you won’t have to install other versions of php, mysql and apache to make this work.

Next thing that you need to do is to open it up on your browser by typing:


or whatever name you gave to the folder. Just choose Standard and click on Save and continue


Select the default English. Then click save and continue.


Enter your database server credentials. The defaults would be:

username: root


Before you put in a database name. You first need to create one. To do that, launch MySql Console from the Wampserver tray icon found at the bottom right corner of the screen.


Input these commands on the mysql console:

create database drupal_db

You can change the drupal_db to whatever you want, it doesn’t  really matter if you use another name.


You’re now ready to input the database name you have just created. This is where the installer is going to put the tables.


After you click on the save and continue, this is what it will look like. Just wait for it to finish. It won’t take long.


All you have to do now is to configure the site name and other settings


Scroll down a bit, and then set the options applicable to you. Then click save and continue.


After that, just click on visit your new site and the installer will bring you to the newly created drupal site of yours. Installed on localhost.


So you won’t really see this on google search results or on any search engine if you try to search it.




That’s how you install drupal. A nice and free content management system just like Joomla. I might make another tutorial like this on how to use Drupal so stay tuned. Thanks for readingSmile

Installing Joomla part 2

This is the second part of the tutorial on how to install Joomla.

I’m not going to discuss the FTP Configuration in detail here. You’ll have to search somewhere else if you want to have an FTP server work with this Content Management System.

All you have to do now is to click ‘next’ then next again until you get to this screen:


As you can see above, it says that you need to delete the installation directory in order for this one to work. Just navigate on the folder where you put Joomla. Mine is in:


Just find the folder named ‘installation’ and delete it.


You’ll see something like this if you haven’t deleted the installation folder yet:


Once you have deleted that you’re now ready to go to the administration panel. To do that, just type in:


The joomla depends on the name of the folder you have included in the web accessible directory.

You’ll see something like this if you succeeded:


If you’re like me, and you have forgotten what you have inputted a while ago then you can find the username on PhpMyAdmin or MySql console if you wanna get fancy.

Just navigate to the name of the database you have inputted a while ago. Then click on jos_users. The first user their would be the administrator. The password you will find is not the password you’ve inputted since the password that is stored is being encrypted. You’re out of luck if you have forgotten the password.


After you have succeeded in logging in, you’ll see something like this:


That’s the admin panel where you can get fancy performing different content management system related action without actually knowing how to code in php or ruby or python.



That’s how you install Joomla. There won’t be any part 3 for this one. Since it only covers the Joomla installation. I might make other tutorials like this for Joomla so stay tunedSmile