Download the PHP package jkindly/sylius-digital-product-plugin without Composer

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

Sylius Digital Product Plugin

Sell digital products in Sylius with uploaded files, external URLs, download limits, and post-payment delivery.

Overview

This plugin adds digital product support to Sylius 2.x.

It lets you:

For uploaded files, the plugin copies the original product file into an order-specific storage when payment is completed. This keeps customer downloads independent from later catalog changes.

Requirements

Installation

1. Require the plugin

2. Register the bundle

Add the plugin bundle to config/bundles.php if it is not registered automatically:

3. Import the plugin routes

4. Extend your Sylius models

The plugin expects your application models to implement its interfaces and use its traits.

Product variant

Your product variant model should:

Example:

Channel

Your channel model should:

Order

Your order model should:

Order item

Your order item model should:

The test application in tests/TestApplication/src/Entity/ shows the full working setup.

5. Point Sylius resources to your extended models

Example:

6. Run migrations

The plugin prepends its Doctrine migrations automatically. Run:

7. Configure mailer, storage, and Twig hooks if needed

The bundle automatically registers:

You only need extra configuration if you want to override the defaults.

Configuration

Root key:

Available options:

Default storage directories:

Built-in File Types

The plugin provides two file types out of the box:

Each file type has its own:

How It Works

Admin side

Payment flow

When the workflow.sylius_order_payment.completed.pay event is triggered, the plugin:

  1. creates DigitalProductOrderItemFile records for every digital file in the order
  2. copies uploaded files into order-specific storage
  3. calculates download limits and expiration dates
  4. dispatches a message that sends the digital download email

Shop side

Customers receive download links after payment and can also access files from the order view.

The public download route uses a UUID token:

Before returning the response, the plugin:

Guest customers are supported because the UUID acts as the download token.

Operational Notes

Resend download email

The admin order page includes an action for resending the digital download email after the order has been paid.

Cleanup abandoned chunks

Large uploads can leave temporary chunk directories behind. Use:

Options:

Extending the Plugin

The file type system is extensible. To add a custom type, create and register:

  1. a DTO implementing FileDtoInterface
  2. a form type extending AbstractFileType
  3. a data transformer for DTO <-> array conversion
  4. a serializer for the configuration payload
  5. a response generator
  6. a provider implementing FileProviderInterface

Register the provider, serializer, and response generator with the plugin tags defined in config/services/.

Development

Test application setup

Tests

For JavaScript Behat scenarios, start a browser driver and the Symfony test server first, as in the test application workflow already used in this repository.

License

This plugin is released under the MIT License.


All versions of sylius-digital-product-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
league/flysystem-bundle Version ^3.6
sylius/sylius Version ^2.0.7
symfony/serializer Version ^6.4 || ^7.4
symfony/yaml Version ^6.4 || ^7.4
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 jkindly/sylius-digital-product-plugin contains the following files

Loading the files please wait ...