Giter VIP home page Giter VIP logo

tanhongit / new-mvc-shop Goto Github PK

View Code? Open in Web Editor NEW
69.0 8.0 30.0 73.73 MB

The NEW-MVC-SHOP is a free e-commerce website project for everyone to use. It is a built-in pure PHP MVC. And anyone can use it.

Home Page: https://chikoiquan.tanhongit.com/

License: MIT License

CSS 7.45% JavaScript 25.35% PHP 42.74% Hack 0.08% HTML 12.01% SCSS 12.31% Dockerfile 0.04% Shell 0.02%
tanhongit php-mvc new-mvc mvc-shop php-mvc-shop php tanhongit-mvc php-shopping-cart php-shop cart-php

new-mvc-shop's Introduction

Welcome to New PHP MVC by TANHONGIT

The NEW-MVC-SHOP is a free e-commerce website project for everyone to use. It is built in pure PHP language. And anyone can use it.

  • Customers do not need to know much about technology.
  • Powerful system, many useful functions.
  • Easy to access, easy to use.

Support the project

Support this project 😜 🙏

PayPal buymeacoffee TanHongIT

1. Configuration requirements

  • Web Server: Apache
  • Version PHP >= 8.0
  • Composer >= 2.0
  • OpenSSL PHP Extension
  • Composer (Please install composer before running this project).
  • MySQL >= 8.0 (or MariaDB >= 10.0)

2. Technology

  • Pure PHP language

3. Feature

1. FRONT-END
    - Shopping cart
    - Save cart with database
    - Customer login
    - Content: Page, Post, Product List, Product Details, Category,...
    - Product attributes: cost price, promotion price, detail,...
    - Feedback, Feedback for product, Feedback for order
    - Comment on Product, Post,...
    - Search, pagination,...
    - Checkout, PlaceOrder,...
    ...

=================================================================

2. BACKEND-ADMIN
    - Admin roles, permission
    - Product manager   (Create, delete, update)
    - Category manager  (Create, delete, update)
    - Order management  (Create, delete, update)
    - Comment manager   (Create, delete, update)
    - Feedback manager  (Create, delete, update)
    - User management   (Create, delete, update)
    - Template manager  (Create, update)
    - Backup database 
    ...

4. Download Database

This is the path to the database file for you to download: /admin/database/***.sql

Create a new database on PHPMyAdmin at your server, then import the .sql file that you just downloaded.

5. Request configuration

Clone the project to your computer:

git clone https://github.com/tanhongit/new-mvc-shop.git

Copy the .env.example file to .env:

cp .env.example .env

Run composer install:

composer install

6. Installation instructions

After running the above command, you need to edit the following information in the .env file:

6.1 Edit Config

You need to change the path in the '.env' file to match the location of this source code on your server and must match the domain you registered.

PATH_URL=/
PATH_URL_IMG=public/upload/images/
PATH_URL_IMG_PRODUCT=public/upload/products/

Note:

The path of the config file that is using these environment variables is located at: /lib/config/config.php

6.2 Edit Connect Database

You need to change the connection information and import sql file to the database after you have cloned my repository so that the website can work.

This is the path to the sql file for you to import to your database: /admin/database/***.sql

And change the connection information to match your database in .env file:

DB_HOST=db_server
DB_PORT=3306
DB_USER=root
DB_PASS=root
DB_NAME=new_mvc_shop_db

Note:

The path of the database config file that is using these environment variables is located at: /lib/config/database.php

6.3 Edit .htaccess

Change RewriteBase - Recommend the path that matches your host address.

So we will have:

RewriteBase /

Note: This applies to the case where your project is in a subfolder, and you want it accessible from a subpath URL.

EXAMPLE:

http://localhost/new-mvc-shop/

So we will have:

RewriteBase /new-mvc-shop/

6.4 Edit SMTP Mail

The third thing: You need to change the information about SMTP Mail to be able to use some functions about user account authentication, change passwords, notify users, ...

Update the following information in the .env file:

SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_UNAME=add_your_mail
SMTP_PWORD=add_your_application_password_from_your_mail

Change the value of the constant SMTP_UNAME and SMTP_PWORD to match the configuration you added on your Gmail.

Tips: https://support.google.com/accounts/answer/185833?hl=en

Where SMTP_PWORD is the application password for your gmail.com account.

Note:

The path of the email config file that is using these environment variables is located at: /lib/config/sendmail.php

7. Install with Docker (Optional)

Note:

Please skip this section if you have already installed the project in the above section.

If you want to run this project with Docker, you can edit .env file and use the following command:

Please edit the following information in the .env file:

(Please set ports for MYSQL_PORT, PHPMYADMIN_PORT, APP_PORT, SSL_PORT and not duplicate with other ports)

Example:

APP_NAME=nms

APP_PORT=85
SSL_PORT=443 # (optional)

MYSQL_PORT=3307
MYSQL_USER=root
MYSQL_ROOT_PASS=root
MYSQL_DB=new-mvc-shop
MYSQL_PASS=root

PHPMYADMIN_PORT=8081
PHPMYADMIN_UPLOAD_LIMIT=2048M

7.1 Installation with bash script:

If your OS is Linux, you can use the bash script to easily run the project with Docker.

bash install.sh

If not, please follow the instructions below.

7.2 Installation with commands:

Run the following command:

docker compose up -d

After running the above command, you need to install the composer package for the project.

docker compose run --rm -w /var/www/html server composer install

Finally, you need to import the database file into the database container.

8. Demo

  1. Front-End: https://chikoiquan.tanhongit.com
  2. Back-End: https://chikoiquan.tanhongit.com/admin.php

Account login on Backend

user :
    username: testna      | email: [email protected]        | password: 123456789
    username: tanhongitii | email: [email protected] | password: 123456789
Mod :
    username: eyteyt      | email: [email protected]   | password: 12345678

Admin:
    username: admin       | email: [email protected]       | password: 1234567890

Demo Images

HomePage

Image


Slide of Homepage

Image


Product Page

Image


Admin Manager Page

Image

Image


license

new-mvc-shop's People

Contributors

dependabot[bot] avatar tanhongit avatar tbreuss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

new-mvc-shop's Issues

Product Image Gallery of navbar Admin manager

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

getting the below errors

Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\lib\counter.php on line 66

( ! ) Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\lib\statistics.php on line 12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.