Download the PHP package vaened/php-price-engine without Composer

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

Price Engine

Build Status

The Price Calculation Library is a tool that allows you to perform complex calculations for prices, taxes, discounts, and charges in your applications. This library is based on the Brick\Money library to ensure precise monetary calculations.

Installation

You can install the library using composer.

Usage

Initializing the Cashier

To start using the Price Engine, create an instance of the any Amount.

Updating Quantity

You can update the quantity using the update() method, that will calculate the totals in the next summary.

Applying Discounts

To apply discounts, use the apply() method, that will calculate the totals in the next summary, and receive as parameter N amount of Discount.

Adding Charges

To add charges, use the add() method, it will calculate the totals in the next summary, and received as parameter N amount of Charge.

Obtaining Individual Totals

To obtain individual values of any price adjuster, you can use the tax() charge(), or discount() functions, all of which receive the code established during creation and return an instance of Adjustment

Obtaining Totals

To obtain the total, you can use individual functions, each of which returns an instance of Brick\Money.

Configuration

Currently there are 2 built-in ways to handle calculations

Cashiers

Choose the cashier that best suits your specific business needs and requirements. You can create your own cashier to fit any specific logic or rule related to your business. If you need to create additional cashiers or implement custom logic, you can do so by extending Cashier. This library provides a flexible foundation to handle various pricing scenarios effectively.

Amounts

There are 2 ways to create the amount.

Taxes

Taxes can be established in two ways.

License

This library is licensed under the MIT License. For more information, please see the license file.


All versions of php-price-engine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
vaened/support Version ^4.0
lambdish/phunctional Version ^2.1
brick/money Version ^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 vaened/php-price-engine contains the following files

Loading the files please wait ....