Download the PHP package craftcms/digital-products without Composer

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

Digital Products

This plugin makes it possible to sell licenses for digital products with Craft Commerce.

Requirements

Digital Products requires Craft 5.0.0 and Craft Commerce 5.0.0 or later.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Digital Products”. Then click on the “Install” button in its modal window.

With Composer

Open your terminal and run the following commands:

Events

The beforeSaveProductType and afterSaveProductType events

Plugins can be notified immediately before or after a product type is saved so your plugin can take action if needed:

The beforeGenerateLicenseKey event

Plugins get a chance to provide a license key instead of relying on Digital Products to generate one.

Eager loading

Both licenses and products have several eager-loadable properties.

Licenses

Products

Examples

Displaying the licensed product for the currently logged in Craft User.

Checking if currently logged in user is licensed to access a product.

GraphQL

Digital products may be queried with GraphQL. Please read the getting started docs to get up to speed with how Craft CMS handles GraphQL requests.

The GraphQL implementation provides two query options: digitalProducts for returning multiple products, and digitalProduct for returning a single product.

An example query and response

Query payload

The response

The digitalProducts/digitalProduct query

Both the queries use the same argument set.

Argument Type Description
id [QueryArgument] Narrows the query results based on the elements’ IDs.
uid [String] Narrows the query results based on the elements’ UIDs.
status [String] Narrows the query results based on the elements’ statuses.
unique Boolean Determines whether only elements with unique IDs should be returned by the query.
title [String] Narrows the query results based on the elements’ titles.
sku [String] Narrows the query results based on the digital products’ SKUs.
slug [String] Narrows the query results based on the elements’ slugs.
uri [String] Narrows the query results based on the elements’ URIs.
search String Narrows the query results to only elements that match a search query.
relatedTo [Int] Narrows the query results to elements that relate to any of the provided element IDs. This argument is ignored, if relatedToAll is also used.
relatedToAll [Int] Narrows the query results to elements that relate to all of the provided element IDs. Using this argument will cause relatedTo argument to be ignored.
ref [String] Narrows the query results based on a reference string.
fixedOrder Boolean Causes the query results to be returned in the order specified by the id argument.
inReverse Boolean Causes the query results to be returned in reverse order.
dateCreated [String] Narrows the query results based on the elements’ creation dates.
dateUpdated [String] Narrows the query results based on the elements’ last-updated dates.
offset Int Sets the offset for paginated results.
limit Int Sets the limit for paginated results.
orderBy String Sets the field the returned elements should be ordered by
type [String] Narrows the query results based on the digital products’ prdocut type handles.
typeId [QueryArgument] Narrows the query results based on the digital products’ product types, per the types’ IDs.
postDate [String] Narrows the query results based on the digital products’ post dates.
before String Narrows the query results to only digital products that were posted before a certain date.
after String Narrows the query results to only digital products that were posted on or after a certain date.
expiryDate [String] Narrows the query results based on the digital products’ expiry dates.

All versions of digital-products with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0.0-beta.7
craftcms/commerce Version ^5.0.0-beta.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 craftcms/digital-products contains the following files

Loading the files please wait ....