Download the PHP package vbpupil/product without Composer

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

Quality Assurance

PHP 7.2

ProductLibrary

A Product Object can have many components based on how complicated your requirements are. Below outlines the general configurations:

SimpleProduct - Without Prices

A SimpleProduct does NOT have any prices. Below shows how a SimpleProduct can be initiated:

Get Description

Get Descriptions

Get Product Attributes

GeneralProduct

On the face of it a General Product is the same as a Simple Product except it has a concept of Variations which itself offers some interesting additions.

To add Variations simplly start by passing in an empty Collection:

Once you have created the Collection simply use it as you would any other Collection object (the above descriptions functionality in Simple Product uses the same functionality).

To add a Variation:

Get Variant Attributes

Pricing

SinglePrice

This handles most use cases when a product variation may have a few prices attributed to it such as prices, special prices, cost prices etc but will only be sold for a single prices. When asking the object for its getPrice() method you will be returned a single prices. Note the object will run a check to see if the Special prices is set/valid and return that if true, if not the sell prices will be returned.

PivotPrice

This object will handle the pivot prices style structure, ie:

Qty Price
1 - 9 5.00
10 - 19 4.00
20 - 30 3.00

to identify which price type a variant is (ie single or pivot) you can use getVariantPriceTypes()
to identify which is the cheapest variant id you can use getCheapestVariantiD() to identify which is the cheapest variant price you can use getCheapestVariantPrice()

Stock

Stock can be measured depending upon needs, the following are available.

SimpleStock

Simple stock offers a simple holding of a stock figure and passes back whenever called upon.

AuditableStock

Auditable stock has the ability to verify what the current stock figure has on hand by performing a retrospective check of its inventory history and spitting out its findings.

Auditable

The auditable class is on hand to offer an explanation of why an items stock figure has changed - ie BOOK_IN/BOOK_OUT etc etc.

AuditableType

This class simply defines what can be accepted as a valid reason. For instance when newing up an Auditable:

A AuditableType::SALE() is passed into to represent a SALE item. This class is governed by Enums which outlines what type is available.

AuditableAssociatesDocumentType

This class allows you to specify what supporting document accompanies the stock change, for instance a SALES_ORDER (with accompanying SALES ORDER ID) would support a sale which resulted in the stock being reduced by 1. Below shows this code in action.

An AuditableAssociatedDocumentType::SALES_ORDER() is passed in to represent a SALES_ORDER. This class is governed by Enums which outlines what supporting document types are available.


All versions of product with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
vbpupil/collection Version ^1.0
myclabs/php-enum Version ^1.7
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 vbpupil/product contains the following files

Loading the files please wait ....