Download the PHP package bitexpert/sylius-product-document-plugin without Composer
On this page you can find all versions of the php package bitexpert/sylius-product-document-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bitexpert/sylius-product-document-plugin
More information about bitexpert/sylius-product-document-plugin
Files in bitexpert/sylius-product-document-plugin
Package sylius-product-document-plugin
Short Description Product document plugin for Sylius.
License MIT
Informations about the package sylius-product-document-plugin
Sylius Product Document Plugin
The Product Document Plugin for Sylius allows you to attach documents (e.g. PDFs, images) to products and organize them by configurable document types.
Create document types in the admin:
Attach documents to a product:
Download the Documents in the storefront:
Features
- Manage document types with translatable names and sortable positions
- Attach multiple documents to a product, organized by document type
- Download documents in the storefront and in the admin
- Control document visibility: public for all visitors or restricted to logged-in customers
Requirements
- PHP 8.4 or higher
- Sylius 2.0 or higher
Installation
-
Install the plugin via Composer
-
Enable the plugin
-
Import config
-
Import routing
- Configure the
Productentity insrc/Entity/Product/Product.php
Add the BitExpert\SyliusProductDocumentPlugin\Model\HasProductDocumentsInterface interface and the BitExpert\SyliusProductDocumentPlugin\Entity\Trait\HasProductDocumentsTrait trait to the entity.
- Update your database schema
Tests
You can run the unit tests with the following command (requires dependency installation):
Contribution
Feel free to contribute to this module by reporting issues or creating pull requests for improvements.
To run the Test Application included in the repo, refer to the Sylius Test Application docs. If you are using DDEV you can run the following commands to bootstrap the Test Application in Docker:
Credits
This plugin was inspired by the AsdoriaSyliusProductDocumentPlugin by Asdoria and has been rebuilt from scratch for Sylius 2.
License
The Sylius Product Document Plugin for Sylius is released under the MIT license.