Download the PHP package doroshko/wish-reward without Composer

On this page you can find all versions of the php package doroshko/wish-reward. 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 wish-reward

Magento 2 Module: Christmas & New Year Wish with Lottery Wheel

This module for Magento 2 implements the following functionality:
A customer writes a Christmas or New Year wish, which is validated using a trained model (currently supports validation only for English greetings). After the wish is validated, the customer gets an opportunity to spin a lottery wheel and potentially win a discount, or they can receive a fixed discount for their wish (configurable in the admin panel).

Initial CTA modal

Main modal


How to install a module

composer require doroshko/wish-reward

or

git clone [email protected]:FrankieSR/WishReward.git app/code/Doroshko/WishReward

then bin/magento mod:en Doroshko_WishReward bin/magento setup:upgrade


Features

  1. Wish Submission and Validation

    • Customers can write their Christmas or New Year wishes.
    • Wishes are validated using a trained machine learning model (currently supports English greetings only).
  2. Lottery Wheel Functionality

    • If enabled, customers can spin a lottery wheel with customizable sectors to win discounts.
  3. Fixed Discount Option
    • If the lottery wheel is disabled, a fixed discount is applied based on a pre-configured cart price rule.

Admin Settings

The module includes the following settings configurable in the Magento 2 admin panel:

General Settings

  1. Enable Module:

    • Enables or disables the module.
  2. Enable Lottery Wheel:

    • Enables or disables the lottery wheel.
    • If disabled, a fixed discount is applied based on the Default Rule ID.
  3. Default Rule ID:

    • Specifies the default cart price rule ID to apply if the lottery wheel is disabled.
  4. Wheel Sectors:
    • Customizable sectors for the lottery wheel.

Wheel Sectors Configuration

The Wheel Sectors field allows you to define the sectors of the lottery wheel with the following customizable attributes:

Example Configuration

More details in app/code/Doroshko/WishReward/Model/ProbabilityCalculator.php

How Winning Probability is Calculated

The winning sector is determined based on the probability value assigned to each sector. The formula used for calculating probabilities is based on weighted random sampling. For example:

Sectors with higher probability values are more likely to be selected.


How It Works

  1. Wish Submission:

    • A customer writes a wish and submits it.
    • The wish is validated to ensure it matches a Christmas or New Year greeting.
  2. Lottery Wheel (Optional):

    • If enabled, the customer spins the lottery wheel.
    • Based on the selected sector, a cart price rule is applied to generate a discount coupon.
  3. Fixed Discount (Optional):

    • If the wheel is disabled, a fixed discount is applied using the Default Rule ID.
  4. Winning or Losing:
    • Sectors without a rule_id represent non-winning sectors. In such cases, a message is displayed indicating no discount was won.

Installation and Configuration

  1. Install the module in your Magento 2 environment.
  2. Navigate to Stores > Configuration > Wish Reward Settings to configure the module:
    • Enable/Disable the module.
    • Configure the lottery wheel or set a default discount rule.
  3. Customize the wheel sectors under Wheel Sectors with labels, rule IDs, probabilities, and optional colors.
  4. Save the configuration and test the functionality on your storefront.

Notes


License

This module is released under the MIT License.
Feel free to use, modify, and distribute this module as needed.


Enjoy spreading festive joy with this interactive and engaging module for Magento 2! 🎄🎁

Contact: https://artem-doroshko.dev/


All versions of wish-reward with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4.3|~8.0.0
magento/framework Version 102.0.*|103.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 doroshko/wish-reward contains the following files

Loading the files please wait ...