Download the PHP package abo3adel/shoppingcart without Composer

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

Shopping Cart


a simple yet powerful and highly customized laravel shopping cart.

Highly inspired by LaravelShoppingcart

Demo shopping-cart

Features

Requirements

How It works

This package use sessions and database, it will save cart items into session for guests and then merge these items when user logIn and save it into database, while user is loggedIn items will be saved into database

Installation

  1. require

  2. Import config file and migration and migrate

  3. configure before migrate

  4. Add a trait and interface (required) to the model that can be bought

Overview

Usage

you can use the facade or the helper function

Cart::add()

return the newly saved item

Cart::find()

return the cart item if found || else null

Cart::update()

return boolean

Cart::delete()

return boolean

Cart::has()

return boolean

Cart::content()

return collection of cart items for current instance. all collection methods allowed see Collections

Cart::destroy()

delete all items for current instance

count of deleted items

Instances

Cart stays in the last set instance if you don't set a different one

Helpers

Cart::total()

get the sum of all items sub_total (qty * price)

Cart::totalPrice()

the sum of all items price

Cart::totalQty()

the sum of all items qty

Cart::subTotal()

get the total minus tax percentage

Cart::setTax()

set tax percentage for current instance only does not affect the configured value

Cart::getTax()

retrieve current tax percentage

Cart::increments()

increase item qty

Cart::decrements()

decrease item qty

Models

CartItem

Buyable

Bonus

Manage another user cart items

Cart stays in the last set User if you don't set a different one

Cart::checkBuyableStockAmount()

this will delete cart items which buyable is out of stock and lower items qty if it exceeded buyable qty

Refresh Items Buyable Object

only required in session this will update the buyable object with latest changes you can use this to check if item buyable still in stock

Exceptions

Exception Reason
InvalidModelException Provided buyable model is missing required attributes (getPrice() - id)
ItemAlreadyExistsException trying to add new item that was already added
ItemNotFoundException trying to update or delete an item that is not found

Events

Event Fired Parameter
CartItemAdded When an item was added to the cart. the CartItem
CartItemUpdated When an item was updated the CartItem
CartItemRemoved when an item was removed the CartItem
CartInstanceDestroyed when all items for this instance is deleted instance

Commands

this will delete old cart item from database older than configured deleteAfter value

Schedule the RemoveOldItemsCommand

Example


Tests

Contribution

Contributions are welcome and will be fully credited. see CONTRIBUTING.md

License

This project is licensed under the MIT License - see the LICENSE file for details


All versions of shoppingcart with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
illuminate/support Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.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 abo3adel/shoppingcart contains the following files

Loading the files please wait ....