Download the PHP package silvershop-suite/product-identity without Composer

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

SilverShop Product Identity

CI

Product-identity master data for SilverShop on Silverstripe CMS 6: EAN/GTIN and MPN fields on both Product and Variation, with a reusable GS1 check-digit validator and CMS validation.

This is a deliberately small, dependency-light foundation (it requires only silvershop/core). GTIN/EAN and MPN are product master data consumed by many things — the product feed (g:gtin / g:mpn), the Product JSON-LD rich result (gtin / mpn), conversion tracking (catalogue matching), plus POS/scanning, stock, packing slips, search-by-barcode and import/export — so it is owned by none of them. Every consumer reads it guarded (class_exists / hasMethod) and degrades gracefully when it is absent.

Requirements

Installation

Then run dev/build?flush=all.

What it adds

Two fields, on both SilverShop\Page\Product and SilverShop\Model\Variation\Variation:

Field Type Purpose
GTIN Varchar(14) EAN-8 / UPC-A (12) / EAN-13 / GTIN-14 barcode, stored digits-only
MPN Varchar(70) Manufacturer part number (alphanumeric, free-form)

The GTIN is per-variant: each sellable variant carries its own barcode, so the variation field is the authoritative GTIN. The product's field covers simple products and acts as the group-level fallback for variants that have no GTIN of their own.

On the product edit form the fields sit on the Content tab directly after the product code (SKU); on the variation form they follow the variant's product code. They are plain, non-translatable fields — barcodes and part numbers are locale-invariant.

Validation

SilverShop\ProductIdentity\GtinValidator is a stateless helper you can reuse anywhere (importers, POS, tests):

A code is valid when, after stripping spaces and hyphens, it is digits only, of length 8, 12, 13 or 14, with a correct GS1 mod-10 check digit. The check proves the code is well-formed only — not that it is a real, registered product (a GS1 / third-party lookup is out of scope for v1).

Enforcement runs through the updateValidate() extension hook on both Product and Variation, so it blocks both CMS saves and programmatic ->write():

validation_mode

Blocking is the default (Google and other channels reject invalid GTINs). Shops mid data-cleanup can downgrade it to a non-blocking warning:

Reading the identifiers (for consumers)

Use the resolved accessors rather than the raw fields — they implement the variant→product fallback in one place:

Consumers should guard the call so the shop still works when this module is not installed:

Core-merge candidate

GTIN/EAN belongs alongside the SKU as first-class product identity. This module is kept generic and tiny on purpose so the field set and validator can later be proposed into silvershop/core. Until then it is a standalone foundation that core does not require.

Licence

BSD-3-Clause.

Credits

Built and maintained by Remy Vaartjes ([email protected]) — part of the SilverShop-Suite.


All versions of product-identity with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
silverstripe/framework Version ^6.0
silverstripe/cms Version ^6.0
silvershop/core Version ^6.2
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 silvershop-suite/product-identity contains the following files

Loading the files please wait ...