Download the PHP package thelia/delivery-delay-module without Composer

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

Delivery Delay

Tells customers when their parcel arrives, as an interval of dates, computed per carrier.

The interval is shown:

Requirements

Installation

Copy the module into local/modules/DeliveryDelay (the folder name must be DeliveryDelay), or install it with Composer:

Then activate it in the back office. Activating it creates its three tables (delivery_delay_carrier, delivery_delay_product, delivery_delay_order_estimate) with CREATE TABLE IF NOT EXISTS; nothing is ever dropped.

Version 3 does not read the data of version 2.x (product_delay, undeliverable_date): the delays have to be entered again, and the days off now come from the calendar of the core.

Configuration

Module configuration page:

Setting Meaning
Preparation (days) Working days the carrier needs to get an order ready. Empty means 0.
Transit minimum / maximum (days) Working days between the departure and the arrival. Both are required, minimum at most maximum.
Cut-off time HH:MM. An order placed at or after this time starts the next working day. Empty: no cut-off.
Carrier shown on the product page Default: the first active delivery module (by position) that has delays.

A carrier whose row is left empty has no delays and gets no estimate: its options keep the dates the carrier gave, and nothing breaks.

Product sheet, tab "Delivery delay":

Setting Meaning
Availability delay (days) Always added to the preparation, for a product made to order.
Restock delay (days) Added on top when the variant ordered is out of stock (quantity of 0 or less, product not virtual).

An empty field is "not filled in", 0 is a value; the two are kept apart.

Reading needs the right to see the module, writing the right to update it.

How the interval is computed

Everything is counted in working days of the carrier: a day is open when the core calendar does not close it for that carrier. Today is read on the clock and in the time zone of the shop.

  1. The first working day is today when it is open and the cut-off time (if any) is not reached, the next open day otherwise.
  2. The effective preparation is the preparation of the carrier plus the delay of the slowest product of the cart (the maximum over the lines of availability delay, plus restock delay for a line out of stock).
  3. The first working day is the first day of preparation: the parcel leaves on the first working day plus max(preparation - 1, 0) open days.
  4. The earliest arrival is the departure plus the minimum transit in open days, the latest arrival the departure plus the maximum.

Example: preparation 1, transit 2, order on Tuesday at 9:00 with no closure: the parcel leaves on Tuesday and arrives on Thursday. After the cut-off time it leaves on Wednesday and arrives on Friday. A holiday closed by the shop between the two moves the arrival by one day.

The calendar is read once for a window of 120 days (longer only when the count needs it, up to about 2.6 years). A calendar with no open day gives no estimate instead of looping.

DeliveryDelay\Estimate\DeliveryEstimator does the counting, with no state and no session or request: it works in a console command too.

When the dates are written

Tests

From the root of the Thelia project, after ddev composer test:prepare with the module active:

Suites: unit (the estimator), integration (options, frozen interval, e-mail, product page), http (back office).


All versions of delivery-delay-module with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
thelia/core Version ^3.3
thelia/installer Version ~1.1
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/delivery-delay-module contains the following files

Loading the files please wait ...