Promotions & Discounts feature integrationEdit on GitHub
The following feature integration guide expects the basic feature to be in place. This document describes how to add the discount prioritization and discount validity period supports HH:MM time definition functionality.
Install feature core
Follow the steps below to install the Promotions & Discounts feature core.
To start feature integration, integrate the required features:
|Spryker Core||202204.0||Spryker Core feature integration|
1) Install the required modules using Composer
Install the required modules:
composer require spryker-feature/promotions-discounts 202204.0 --update-with-dependencies
Make sure that the following modules have been installed:
2) Set up database schema and transfer objects
Apply database changes and generate entity and transfer changes:
console transfer:generate console propel:install
Make sure that the following changes have been applied by checking your database:
Make sure that the following changes have been triggered in transfer objects:
Make sure that the discount form has the PRIORITY field, and the discounts table has the PRIORITY column.
Make sure, that the existing discounts in the
spy_discount DB table have priority set to
3) Add translations
Generate a new translation cache for Zed:
Make sure that all labels and help tooltips in the discount form has English and German translation.
4) Build Zed UI frontend
console frontend:zed:install-dependencies console frontend:zed:build
Make sure that discounts are calculated according to their priorities:
- Create a couple of percentage discounts with different priorities.
- To fulfill the discounts’ requirements, add items to the cart.
- Check that discounts are applied in the correct order and the calculated discount total is correct.
Make sure that you can submit the Discount Create and Discount Update forms with specified date and time for Valid From and Valid To discount form fields:
- In the Back Office, go to Merchandising > Discount.
- Create a new discount or update an existing one, check that you can see the Discount form.
- Click on Valid From and Valid To fields to ensure you can see the calendar, where you can select specific date and time.
- Make sure Valid From and Valid To fields can accept the selected date and time (for times not falling on the hour, use keystroke entry—for example, 13:45).
- In the
spy_discountDB table, make sure Valid From and Valid To date and time are saved correctly.
For submitting the form