Download the PHP package daikazu/flexicart without Composer

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

FlexiCart

PHP Version Require Laravel Version Latest Version on Packagist GitHub Tests Action Status PHPStan Total Downloads GitHub forks GitHub stars

A flexible shopping cart package for Laravel with support for session or database storage, conditional pricing, and custom product attributes.

Table of Contents

Features

Installation

Requirements

Install the Package

You can install the package via composer:

Publish Configuration

Publish the configuration file to customize the package settings:

This will publish the configuration file to config/flexicart.php.

Database Storage (Optional)

If you want to use database storage instead of session storage, you need to run the migrations:

Then update your .env file:

Basic Usage

Adding Items to the Cart

You can add items to the cart using the addItem method. Items can be added as arrays or CartItem objects:

Updating Items in the Cart

Update existing items using the updateItem method:

Removing Items from the Cart

Remove items individually or clear the entire cart:

Getting Cart Content and Calculations

Access cart items and perform calculations:

Understanding Conditions

Conditions are adjustments that can be applied to cart items or the entire cart. There are several types:

Conditions can target:

Adding Conditions

Add conditions to the cart or specific items:

Removing Conditions

Remove conditions from the cart or items:

Marking Items as Non-Taxable

By default, all items are taxable. You can mark specific items as non-taxable:

Configuration Options

Storage Configuration

Configure how cart data is stored:

Session Key Configuration

Customize the session key when using session storage:

Currency and Locale Configuration

Set the default currency and locale for price formatting:

Custom Models Configuration

When using database storage, you can specify custom models:

Compound Discounts

Control how multiple discounts are calculated:

Cart Cleanup

Configure automatic cleanup of old carts when using database storage:

Working with Prices

FlexiCart uses the Brick/Money library for precise price calculations.

Creating Price Objects

Price Operations

Formatting and Conversion

Displaying the Cart in Blade

Here's an example of how to display cart contents in a Blade template:

Database Storage Notes

When using database storage, FlexiCart creates the following tables:

Cart Persistence

With database storage, carts are automatically persisted. You can also manually persist session-based carts:

Multiple Carts

You can work with multiple carts by specifying cart IDs:

Extending the Package

Custom Condition Class

Create custom condition types by extending the base Condition class:

Custom Storage Method

Implement custom storage by creating a class that implements StorageInterface:

Then configure it in your flexicart.php config file:

Testing

The package comes with comprehensive tests. To run them:

Troubleshooting

Common Issues

Cart data not persisting between requests

Price calculation errors

Condition not applying correctly

Memory issues with large carts

Debug Mode

Enable debug mode to get more detailed error messages:

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.


All versions of flexicart with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-bcmath Version *
ext-intl Version *
brick/money Version ^0.10.1
illuminate/contracts Version ^10.0||^11.0||^12.0
illuminate/session Version ^10.0||^11.0||^12.0
illuminate/support Version ^10.0||^11.0||^12.0
spatie/laravel-package-tools Version ^1.16
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 daikazu/flexicart contains the following files

Loading the files please wait ....