This online store system with confirmation email on which I share the code, allows you to manage customer purchase orders, confirming your order in a simple and effective way, according to the indicated email address.
Explanatory video (spanish)
Setup of the online store system with confirmation mail in PHP and MySQL on a local server
To install the application on a local server, I recommend the prior installation of the following applications:
Git is the world's most widely used repository manager, with which you can cleanly download code from GitHub.
Visual Studio Code is the world's most popular code editor, which I highly recommend in virtually every post on this blog.
Download GitHub App
The following is the GitHub repository download link for the online store app on a local server:
Configuration of the online store system with confirmation mail in PHP and MySQL for its operation on your computer
You must install the mentioned applications, with all the default parameters, after this procedure, from Visual Studio Code, you must open the following location:
From this location in Visual Studio Code, click View, Terminal. Inside the Terminal you choose the Git Bash option and copy the following code:
git clone https://github.com/configuroweb/tienda-correo.git
The folder will be created tienda-correo, inside the htdocs folder. Next, you must open XAMPP on your computer, activate the Apache and MySQL services, and access the following URL, to create the store-mail database:
Store Database with email confirmation
For the application to work correctly, from phpmyadmin, you must create the database with the name tienda-correo, then you must access the SQL section and paste the code found in the following link:
This process is carried out entirely from a local server, for this it is necessary to configure the parameters of the mail from where we are going to send it.
For the example, XAMPP is used, which is the application with which the Apache and MySQL servers are managed mainly. To make this procedure effective, two XAMPP root configuration files for PHP are configured.
Additional settings for sending mail from a local server
In addition, the sendmail.ini and php.ini documents must be modified. In sendmail.ini, the following parameters must be changed:
- error_logfile, this parameter must be enabled to know the errors that may occur.
- auth_username, here is the mail from where we are going to send
- auth_password, in this section the password is entered
- force_sender the email is placed again
The parameters to modify in the php.ini document are:
- SMTP, for the case of the example I use a mail hostinger, SMTP,
- smtp_port, the port supported by the email server
- sendmail_from, here you put the email from where the mail will be sent
- sendmail_path, here the address where the executable sendmail.exe is located is set, if you install XAMPP with all the default parameters, the location will be as follows: sendmail_pathC:\xampp\sendmail\sendmail.exe -t
After this you can access the following URL and the application will be ready for use:
I did the configuration of the application with my hostinger mail server, from my domain mauriciosevilla.com, if you want to carry out the process with gmail, you can follow the instructions in the following video:
Upload of the online store system with confirmation email in PHP and MySQL to a hosting
Due to the simplicity of the application, I will not address the issue directly, in the following related video (spanish), I explain the process at a general level:
If you still have doubts about the process of setting up the application on a local server