The primary goal of the Green Garden Website is to streamline the purchasing process for users who operate businesses on Facebook pages and groups by providing an efficient platform for showcasing gardening products. This project aims to:
-
Enhance User Experience: Allow consumers to easily filter products based on categories and price ranges, minimizing the time spent scrolling through social media for product details.
-
Simplify Communication: Enable users to take screenshots of products and send them directly to the business's Facebook page for inquiries. The screenshots will include unique code numbers, allowing admins to quickly identify and retrieve relevant product information.
-
Facilitate Product Management: Provide admins with a secure login feature to upload and manage products seamlessly. The system will include a database query functionality, enabling admins to efficiently retrieve product details and relay information to workers.
-
Encourage User Engagement: Allow users to contact the website owner via email for any queries, promoting a responsive and customer-oriented approach.
By achieving these goals, the Green Garden Website will significantly improve the interaction between consumers and business owners, making the shopping experience more accessible, organized, and effective.
- Dynamic product upload functionality
- About Us, Services descriptions, and contact form
- User-friendly design with responsive layout
- Database integration for storing uploaded products
- Form submission with email notification upon successful contact
- HTML5
- CSS3 (Stylesheets in
css/styles.css
) - JavaScript (app logic in
js/app.js
) - PHP (server-side)
- MySQL (database for storing product and contact information)
📦green-garden
┣ 📂.github
┃ ┗ 📂ISSUE_TEMPLATE
┃ ┃ ┣ 📜bug_report.md
┃ ┃ ┗ 📜feature_request.md
┣ 📂assets
┃ ┗ 📂images
┃ ┃ ┗ 📜placeholder.jpg
┣ 📂css
┃ ┗ 📜styles.css
┣ 📂js
┃ ┗ 📜app.js
┣ 📂utilities
┃ ┣ 📜footer.php
┃ ┗ 📜header.php
┣ 📂vendor
┃ ┣ 📂composer
┃ ┣ 📂phpmailer
┃ ┗ 📜autoload.php
┣ 📜LICENSE
┣ 📜README.md
┣ 📜about.php
┣ 📜composer.json
┣ 📜composer.lock
┣ 📜contact.php
┣ 📜db.sql
┣ 📜db_connection.php
┣ 📜fetch_products.php
┣ 📜green_garden.sql
┣ 📜index.php
┣ 📜product_detail.php
┣ 📜product_upload.php
┣ 📜product_upload_process.php
┣ 📜services.php
┗ 📜submit_contact.php
These instructions will help you set up the project on your local machine for development and testing purposes.
You need the following to run this project:
- A local server (XAMPP, WAMP, or MAMP)
- PHP 7.4 or higher
- MySQL database
- Code editor (e.g., VSCode)
-
Clone the repository:
git clone https://github.com/maruf-pfc/green-garden.git
-
Move the project to your local server directory:
If you're using XAMPP, place the project folder in:
/opt/lampp/htdocs/green-garden
-
Start your local server:
Open XAMPP or MAMP and start Apache and MySQL.
-
Set up the database:
- Open phpMyAdmin and create a new database named
green_garden
. - Import the
green_garden.sql
file into this database to create the necessary tables.
- Open phpMyAdmin and create a new database named
-
Install PHPMailer:
The project uses PHPMailer for sending emails. Install it via Composer with the following command:
composer require phpmailer/phpmailer:^6.9
This will add the following to your composer.json file:
{
"require": {
"phpmailer/phpmailer": "^6.9"
}
}
-
Access the website:
In your web browser, navigate to:
http://localhost/green-garden
-
Test product uploads:
You can visit the product upload page at:
http://localhost/green-garden/product_upload.php
To upload a product you have to sign in as an admin. The default admin credentials are:
- Username:
admin
- Password:
admin123
- Username:
-
Database Configuration:
Ensure that the
db_connection.php
file contains the correct database credentials:$host = 'localhost'; $user = 'root'; $password = ''; $dbname = 'green_garden';
-
Browse the website:
Test all pages, including the home page (
index.php
), about us page (about.php
), services page (services.php
), and contact page (contact.php
).
If you'd like to contribute, follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes and commit (
git commit -m 'Add new feature'
) - Push to the branch (
git push origin feature-branch
) - Open a Pull Request
This project is licensed under the MIT License.