Download the PHP package thelia/order-minimum-amount-module without Composer

On this page you can find all versions of the php package thelia/order-minimum-amount-module. 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 order-minimum-amount-module

Order Minimum Amount

Refuses an order whose cart total is below a minimum amount. Thelia 3.

Installation

Version 3 needs Thelia 3. Thelia 2 shops stay on 2.x.

Settings

Back office, module configuration, or from the console:

A shop upgraded from 2.x keeps its amount (same minimum_amount key) and compares taxes included until the setting is changed.

How the order is refused

The module declares a checkout step, order_minimum_amount, with no screen: it never shows in the tunnel, and it is checked when the order is placed (theme and front API). A cart below the minimum is refused with:

Twig

order_minimum_amount() returns the minimum of the cart in session, or null without a cart. The total is computed once per call, the minimum of a customer once per request.

Fields: minimumAmount, cartTotal, remainingAmount, taxesIncluded, currencyCode (amounts as decimal strings with two decimals), reached.

A minimum per customer

Another module gives a customer a minimum of their own by answering OrderMinimumAmount\Event\CustomerMinimumAmountEvent. The event is dispatched only when the cart belongs to a customer, at most once per customer and per request. Its amount replaces the global minimum and is compared in the configured mode (taxes included or not). 0 means no minimum for this customer. Nobody answering means the global minimum. When several listeners answer, the last one to set the amount wins.

An amount that is not a positive decimal with at most two decimals is an error.


All versions of order-minimum-amount-module with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
thelia/installer Version ^1.6
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 thelia/order-minimum-amount-module contains the following files

Loading the files please wait ...