BrilliantEarth e-Commerce System

This system is my Final Year Project during 3rd-year at Universiti Teknikal Malaysia Melaka. As the name implies, it is an e-commerce website that selling a jewelry products.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

  1. Clone the repo and cd into it
  2. composer install
  3. Rename or copy .env.example file to .env
  4. php artisan key:generate
  5. Set your database credentials in your .env file
  6. Set your Stripe credentials in your .env file. Specifically STRIPE_KEY and STRIPE_SECRET
  7. Set your APP_URL in your .env file. This is needed for Voyager to correctly resolve asset URLs.
  8. Set ADMIN_PASSWORD in your .env file if you want to specify an admin password. If not, the default password is 'password'
  9. npm install
  10. npm run dev
  11. php artisan serve to run on localhost
  12. Visit localhost:8000 in your browser
  13. Visit /admin if you want to access the Voyager admin backend. Admin User/Password: admin@admin.com/password. Admin Web User/Password: adminweb@adminweb.com/password

Shopping Cart Package

Crinsane/LaravelShoppingcart - slow to update to the latest versions of Laravel hardevine/LaravelShoppingcart - updates quicker

Windows Users - money_format() issue

The money_format function does not work in Windows. Take a look at this thread. As an alternative, just use the number_format function instead.

  1. In app/helpers.php replace money_format line with return '$'.number_format($price / 100, 2);
  2. In app/Product.php replace money_format line with return '$'.number_format($this->price / 100, 2);
  3. In config/cart.php set the thousand_seperator to an empty string or you might get a 'non well formed numeric value encountered' error. It conflicts with number_format.

Built With

  • Laravel - The web framework used
  • Voyager - An admin/backend interface for your Laravel app
  • Stripe - Online payment gateway

Authors

  • Andre Madarang - laravel-ecommerce-example - drehimself

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc