Download the PHP package phil/commerce-product-template without Composer

On this page you can find all versions of the php package phil/commerce-product-template. 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 commerce-product-template

phil/commerce-product-template

One template and one design give every product of a catalogue: each SKU, its price, its channels and its artworks.

phil/commerce-product-template describes a product made to order on a blank. A template is the blank: its axes — a size, a colour, a version — with their values in order, each with its code, its label in several languages, its swatch, the name the supplier gives it and the photo of the blank on each face; the price of each combination, from a base, a price per value of one axis and supplements on any axis; the faces and their print zones in millimetres; the combinations the supplier does not make; and the pattern of the SKU, {design}{lang}{version}{size}{colour} or any other. A design is what is printed: its code, its language versions, its artworks per face and zone, the templates it is made on and the values it allows. The planner turns a design on a template into one product per language and combination, refuses a pattern that would give two products the same SKU, and gives the same plan for the same input, so a catalogue regenerated from it is updated rather than duplicated.

It is for a shop that sells printed goods in many sizes and colours from a handful of blanks: shirts, hoodies, mugs, posters. A shirt is the example the documentation follows; nothing in the library knows what a shirt is.

It is a plain PHP library with phil/money for its prices and nothing else. The Symfony bundle phil/commerce-product-template-bundle stores templates and designs, generates the products of a catalogue from the plan, composes their mockups and declares their options.

Status

Part State
Axes and values: codes, labels by locale, swatches, supplier names, photos per face, channels Implemented and tested
Prices: base, a price per value of one axis, supplements on any axis Implemented and tested
Faces and print zones in millimetres, resolution, rectangle on the photos Implemented and tested
Combinations excluded by axis values Implemented and tested
SKU patterns, glued or separated, with the collision check Implemented and tested
Designs: language versions, artworks by face, zone, language and condition, templates and values allowed Implemented and tested
Planning: products, prices, channels, artworks, names and attributes Implemented and tested
Arrays for storage, versioned and checked on reading Implemented and tested

Documentation

Document What it covers
Installation Requirements and installing.
Templates Template, Axis, AxisValue, Label, Swatch, Face, PrintZone, PhotoBox, Pricing, Exclusion.
SKU patterns Placeholders, literals, the collision check.
Designs Design, LanguageVersion, Artwork: languages, artworks and what a design allows.
Planning VariantPlanner, Variant, PlacedArtwork: what a plan holds and refuses.
Storage TemplateArray and DesignArray: the arrays, their version, what reading refuses.
Extension points What an application chooses.
Exceptions ProductTemplateException, InvalidDefinition, PlanRefused.
Testing The library's tests, fuzz targets and benchmark.
Reference Every public type of the library.

Quick start

Requirements

PHP 8.5 or later with ext-mbstring, and phil/money.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of commerce-product-template with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
phil/money Version ^0.1@dev
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 phil/commerce-product-template contains the following files

Loading the files please wait ...