Download the PHP package escolalms/cart without Composer

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

Cart

swagger codecov phpunit downloads downloads downloads Maintainability Mutation testing badge

Purpose

This package lets you manage user Shopping Cart, and defines what is a buyable Product (and what are Productables, that is sellable things), that can be then added to the Cart. This package also lets your users create Orders and buy content of their Carts.

Installation

Dependencies

This package depends on EscolaLms/Payments package for creating and processing Payments for Orders.

Usage

Product

EscolaLms\Cart\Models\Product is a Model that represents abstract buyable thing that can be added to Cart and bought. Product by itself has no additional functionality than being bought and assigned to Users.

Products consist of one (Single type products) or more (Bundle type products) Productables - that is, Models representing concrete things that are sold in your (LMS) application, for example Courses. Productables must implement Productable interface.

Productable

EscolaLms\Cart\Contracts\Productable interface defines how Model representing sellable things behave and which methods and relations they must contain.

Defining Productables

To create (and sell) Products, you need to define Productables. A Productable is a Model implementing EscolaLms\Cart\Models\Contracts interface (and possibly using EscolaLms\Cart\Contracts\ProductableTrait). After adding this interface to your Model, you need to call EscolaLms\Cart\Facades\Shop::registerProductableClass(Productable::class) in one of your Service Providers boot method. This will enable using this Productable Model as a (part of) Product which can then be sold.

Shop Facade

Shop Facade wraps EscolaLms\Cart\Services\ProductService giving access to methods related to registering Productables and managing Products.

Cart Model

EscolaLms\Cart\Models\Cart is a model representing User Cart. Every User can have one active (existing) Cart at given time.

To create Cart (or retrieve current active Cart) for a given user, you need to call EscolaLms\Cart\Services\ShopService::cartForUser($user) method.

Cart Manager

Cart and its content is managed using EscolaLms\Cart\Services\CartManager class instance attached to that Cart, instead of manipulating Cart object directly. CartManager is used by EscolaLms\Cart\Services\ShopService (and you probably don't need to use it directly, as methods in ShopService represent all sensible use cases).

Shop Service

Shop Service contains functionality related to managing Cart content (adding/removing Products), and purchasing Cart (storing Cart data as an Order and processing payment flow).

Endpoints

All the endpoints are defined in swagger.

Tests

Run ./vendor/bin/phpunit to run tests. See tests/Mocks directory, as it represents core concepts of Productable and use of Productable Trait & Interface.

Test details codecov phpunit

Events

Listeners

How to use this on frontend

Admin panel

Left menu

List of Products

Creating/editing Product

List of Orders

Details of Order

Permissions

Permissions are defined in Seeder.

Roadmap. Todo. Troubleshooting


All versions of cart with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
escolalms/auth Version ^0 >=0.1.86
escolalms/categories Version ^0 >=0.1.21
escolalms/core Version ^1.2
escolalms/files Version ^0
escolalms/payments Version ^0 >=0.2.0
escolalms/tags Version ^0 >=0.1.14
escolalms/templates Version ^0 >=0.2.5
laravel/framework Version >=8.0
maatwebsite/excel Version ^3.1
treestoneit/shopping-cart Version ^1.4
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 escolalms/cart contains the following files

Loading the files please wait ....