mirchaye/laravel-shopping-cart

Simple laravel shopping cart package

Downloads

2

Stars

0

Version

v0.1.0

Simple laravel shopping cart package

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This Shopping Cart Package is a versatile and user-friendly shopping cart solution for Laravel applications. It empowers developers to effortlessly integrate a shopping cart system into their e-commerce projects.

:heavy_plus_sign: Features:

  • Easy Cart Management: Add, update, and remove items from the cart with simple and intuitive methods.
  • Multiple Instances: Create multiple instances of the cart, each with its own set of items, catering to different requirements.
  • Flexible VAT Handling: Support for items with or without VAT, giving you control over tax calculations.
  • Custom Tax Rate: Set the tax rate for the cart to ensure accurate tax calculation based on your region or business rules.
  • Convenient Totals: Get total, subtotal, and tax amounts with ease, making it a breeze to display accurate cart summaries.
  • Comprehensive Testing: The package comes with a robust suite of unit tests, ensuring reliable and bug-free functionality.

Installation

You can install the package via composer:

composer require mirchaye/laravel-shopping-cart

You can publish and run the migrations with:

php artisan vendor:publish --tag="laravel-shopping-cart-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="laravel-shopping-cart-config"

This is the contents of the published config file:

return [
    'tax_rate' => 15.0,
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel-shopping-cart-views"

Usage

$shoppingCart = new Mirchaye\ShoppingCart();
echo $shoppingCart->echoPhrase('Hello, Mirchaye!');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

mirchaye

Author

mirchaye