Download the PHP package saasify/shopping-cart without Composer

On this page you can find all versions of the php package saasify/shopping-cart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shopping-cart

Saasify Cart

A simple cart for Laravel. Might be oppinionated for Saasify/Saasify, but should work for any other projects.

Run tests

Packagist Packagist Packagist

Laravel PHP Shopping Cart
9.x 8.x 9.0
8.x 7.4 9.0
8.x 8.0 9.0
6.x 8.0 9.0
6.x 7.4 9.0

Install

Install via composer

Publish configuration file and migrations

Edit config/cart.php if necesarry

Run migrations

Overview

Usage

The shopping cart gives you the following methods to use:

Cart::add()

Add an item to the shopping cart.

Cart::remove()

Remove the item with the specified unique id from the shopping cart. Unique id is used to store items with the same $id, but different $options.

Cart::has()

Check if the shopping cart contains the item with the specified unique id.

Cart::get()

Get an item in the shopping cart by its unique id.

Cart::content()

Get all items in the shopping cart.

Cart::clear()

Clear the shopping cart.

Cart::count()

Return number of items in the shopping cart. This method does not summarize quantities of item. For example, there are 3 books and 1 iPhone in the shopping cart, so this method returns 2.

Cart::getTotal()

Return total price of all items in the shopping cart.

Instances

The package supports multiple instances of the cart. Some examples:

The default cart instance is called default, so when you're not using instances,Cart::content(); is the same as Cart::instance('default')->content().

Cart::instance()

Set current instance name.

Cart::currentInstance()

Get current instance name.

Storage

Currently there are two possible storage to persist shopping cart:

You can choose one by specifying repository class name in config

Cart::store()

Persist current shopping cart instance to storage.

Cart::restore()

Restore shopping cart instance to storage.

Cart::destroy()

Remove shopping cart instance from storage.

Coupons

You can easily add discount coupons to shopping cart. Currently there are two types of coupons:

Related methods:

Cart::addCoupon()

Add coupon to cart.

Cart::coupons()

Returns all coupons.

Cart::getTotalWithCoupons()

Returns total price with applied coupons.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits


All versions of shopping-cart with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
illuminate/container Version ^6.0|^8.0|^9.0
illuminate/database Version ^6.0|^8.0|^9.0
illuminate/redis Version ^6.0|^8.0|^9.0
illuminate/support Version ^6.0|^8.0|^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saasify/shopping-cart contains the following files

Loading the files please wait ....