Scheduled Prices Feature Overview
- Updated on 03 Apr 2020
- 3 minutes to read
The Scheduled prices feature enables shop administrators to schedule price changes, which are to happen in the future for multiple products simultaneously.
Currently, the feature only works with the following price types:
A default price is the one that is shown as a real price of product.
An original price is the one that, in the front end, is shown as a strikethrough to identify that the price has been used before the default price was applied as if there is a promotion.
You can define price schedules using any time zone. For example, the following value defines the price application time in Europe/Berlin time zone: 2019-06-23T23:00:00+02:00.
Defining Product Price Schedules
You can define price schedules as follows:
Import a csv file with a list of prices. This option is for bulk operations. You can import the file via Back Office or manually.
Add a price schedule to a single abstract or concrete product. This option is suitable for working with a small number of products. See Editing an Abstract Product.
Once imported, prices do not get updated right away. In order to automate price application, there is a cron job shipped with the feature. The cron job checks if there are any imported scheduled prices that need to be applied or reverted. If there is a price schedule that passed its starting or ending date, the cron job applies the changes.
By default, the cron job runs every day at 00:06:00-00:00. In some cases, it might be necessary to change this behavior. For example, if you schedule a price to be updated at 00:01:00-00:00, the price will be updated at 00:06:00-00:00 since that's when the cron job runs. 00:01:00-00:00. In this case, you can schedule the cron job to be run at 00:01:00-00:00. When you add, edit or delete a price schedule while editing a product, the cron job runs automatically for this single product.
If you import prices that need to be applied right away, you can run price-product-schedule:apply console command. This command applies the imported prices in current store. If needed, you can specify the store by adding a store relation parameter. For example, you would use the following command to apply imported prices in US store: APPLICATION_STORE=US console price-product-schedule:apply.
Scheduled Price Application Logic
You can schedule multiple prices on overlapping dates. For example, you define that:
- Scheduled price #1 takes effect between 01.01 and 31.07.
- Scheduled price #2 takes effect between 25.02 and 08.06.
- Scheduled price #3 takes effect between 01.03 and 01.04.
In this case:
Scheduled price #1 is applied on 01.01 and remains active till scheduled price #2 gets applied on 25.02.
Scheduled price #2 remains active till the scheduled price #3 gets applied on 01.03.
When active period of scheduled price #3 ends on 01.04, price reverts back to scheduled price #2.
When active period of scheduled price #2 ends on 08.06, price reverts back to the scheduled price #1.
When there are no scheduled prices left to apply, the ORIGINAL price specified outside of scheduled price logic, gets applied.
When there are no scheduled prices left to apply and there has been no ORIGINAL price specified outside of scheduled price logic, it will become impossible to add the product to cart and its price won't be displayed.
Currently, the feature has the following functional constraints which are going to be resolved in the future.