Download the PHP package madcoders/sylius-giftcard-plugin without Composer

On this page you can find all versions of the php package madcoders/sylius-giftcard-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-giftcard-plugin

Sylius Gift Card Plugin

Sell gift cards in your Sylius store, spend them against what a customer owes, and let customers track what is left on them.

CI

Status: 1.0.0-RC.1. Feature-complete and green across the supported Sylius, Symfony and database matrix. Being a release candidate it wants real-world use before a stable tag - see CHANGELOG.md for what is in it and what is deliberately left out.

Requires "minimum-stability": "RC" (or composer require madcoders/sylius-giftcard-plugin:^1.0@RC) until 1.0.0 is tagged.

What it does

Not in 1.0: PDF gift cards, API Platform resources, bulk generation. See docs/adr-log/0009-no-pdf-in-1-0.md.

Requirements

PHP ^8.3
Sylius ^2.0 (tested against ~2.0, ~2.1, ~2.2)
Symfony ^6.4 \|\| ^7.4

Installation

Then follow docs/INSTALLATION.md - the plugin needs its bundle registered, its configuration and routes imported, and its entity extensions applied to your Product, Order and OrderItemUnit.

How redemption works

A gift card is money, not a discount. The order stays worth what the goods are worth; the card comes off what the customer has to pay. A 100 order paid with a 40 card is still a 100 order, and the customer pays 60.

That matters beyond bookkeeping: tax is owed on the value of the goods sold and was already settled on the card when it was bought, refunds and reporting see an order worth what was actually sold, and a card cannot switch off a "spend over X" promotion by moving the total it tests.

Read the split with Order::getAmountToPay() and Order::getGiftCardTotal(). getTotal() is the value of the goods, not what the customer pays. The reasoning is in docs/adr-log/0010-gift-card-as-tender.md.

Development

The demo data

make app loads a gift card in every state the plugin can produce, so the admin grid, the account pages and the cart panel all have something to show:

Card What it demonstrates
GIFT-FULL0001, GIFT-SMALL001 Spendable; two of them on one cart proves cards stack
GIFT-LARGE001 Worth more than the cart - covers it all and keeps the change
GIFT-USED0001 Partly spent, with the ledger entry explaining the balance
GIFT-EMPTY001 Spent out: still listed, no longer redeemable
GIFT-EXPIRED1, GIFT-DISABLED The two ways a card stops being redeemable
GIFT-EXPSOON1, GIFT-LONGLIFE Expiring in a week, and in twenty-five years - there is no card without an expiry, because there is no way to make one
GIFT-GIFTED01 Bought by one customer, not yet used by anybody
GIFT-SHARED01 The two-customer model: bought by one, spent by another
GIFT-SELFUSE1 Bought and used by the same person

[email protected] and [email protected] (password sylius) are the two customers those last three cards link, and the first two products in the catalogue are marked as gift card products so the "buying one issues a card" flow can be walked through.

Usage guide: docs/CONTRIBUTING.md. Working on this with an AI agent? Start from AGENTS.md.

The primary branch is 1.0 - this repository has no main or master, following the Sylius version-branch model.

Credits

Functionally inspired by Setono/SyliusGiftCardPlugin. Built and maintained by Madcoders.

License

EUPL-1.2.


All versions of sylius-giftcard-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
sylius/sylius Version ^2.0
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 madcoders/sylius-giftcard-plugin contains the following files

Loading the files please wait ...