Download the PHP package darthsoup/shoppingcart without Composer

On this page you can find all versions of the php package darthsoup/shoppingcart. 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 shoppingcart

Laravel Cart

Total Downloads License

An easy shoppingcart implementation for Laravel > 6. Based on the work of Gloudemans\Shoppingcart.

Features

This package for shopping carts provides these features:

Installation

To get the latest version, simply require the library using Composer.

Once installed, you'll need to publish the vendor assets

This will create cart.php config file.

Usage

The cart package provides you the following methods to use:

Add Item

you also can make Items by make them manually

Update one Item

Get One Cart Item

Show Cart Content

Show the content of the Cart by returning the CartCollection

Empty the cart

Remove one Item or Subitem

Total Price of all Items

Item Count

SubItems

This package also includes the functionality to add Subitems by adding them to an additional collection in the Item

Add SubItem

The addSubItem function works basically like add but it accepts a parent row Id at the end to add an SubItem to the item.

Remove SubItem

Just like removing normal ones, just include your subItem rowId and it will be removed from the parent

Models

A new feature is associating a model with the items in the cart. Let's say you have a Product model in your application. With the associate() method, you can tell the cart that an item in the cart, is associated to the Product model.

That way you can access your model right from the CartCollection!

Here is an example:

Using the key model to access the model that you associated.

Exceptions

The Cart package will throw exceptions if something goes wrong. This way it's easier to debug your code using the Cart package or to handle the error based on the type of exceptions. The Cart packages can throw the following exceptions:

Exception Reason
InstanceException When no instance is passed to the instance() method
InvalidRowIdException When the $rowId that got passed doesn't exists in the current cart
InvalidQuantityException When the quantity is outside the set limits
ClassNotFoundException When an class cannot found while association

Events

The cart also has events build in. There are five events available for you to listen for.

Event Fired
cart.added($item) When a item is added
cart.subitem.added($item) When a sub item is added
cart.updated($rowId) When an item in the cart is updated
cart.removed($rowId) When an item is removed from the cart
cart.destroyed() When the cart is destroyed

Contributions

Please use Github for reporting bugs, and making comments or suggestions. See CONTRIBUTING.md for how to contribute changes.


All versions of shoppingcart with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
illuminate/support Version ~6.0|~7.0|~8.0
illuminate/session Version ~6.0|~7.0|~8.0
illuminate/events Version ~6.0|~7.0|~8.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 darthsoup/shoppingcart contains the following files

Loading the files please wait ....