Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TAN-0084] Apply coupon code automatically if weather is bad #84

Open
8 of 11 tasks
lastralab opened this issue Mar 7, 2024 · 1 comment
Open
8 of 11 tasks

[TAN-0084] Apply coupon code automatically if weather is bad #84

lastralab opened this issue Mar 7, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lastralab
Copy link
Owner

lastralab commented Mar 7, 2024

Requirements:

  • Create a cart rule that applies 20% discount to all products in cart using coupon code 'BADWEATHER' (1 use per customer)
  • Use weather/temperature code to save temperature per registered users only [customer_id => customer_ip/temperature]
  • Use the flag table to store that data
  • Update flag entry every time the user logs in using the queue
  • Update flag entry via cron job customizable from the backend, set default time to every hour (only for logged-in users)
  • Create customization to apply cart rule for temperature range
  • Update flag entry via CLI
  • Show banner at the top of the page whenever the coupon link can be applied (meeting conditions based on temp range)
  • Apply coupon code automatically as 'bad weather' limit to 50 coupons. The user has the option to open a link to apply it.
  • User cannot apply coupon code manually, if applied, an event should be dispatched and an observer should verify the weather is indeed in the set range, but also has to check if code was applied previously for that user
  • Add test unit
@lastralab lastralab added the enhancement New feature or request label Mar 7, 2024
@lastralab lastralab self-assigned this Mar 7, 2024
@lastralab lastralab changed the title [TAN-0075] Apply coupon code automatically if weather is bad [TAN-0084] Apply coupon code automatically if weather is bad Mar 7, 2024
@lastralab lastralab added this to Demo Mar 7, 2024
@lastralab lastralab moved this to Todo in Demo Mar 7, 2024
@lastralab lastralab moved this from Todo to In Progress in Demo Mar 12, 2024
@lastralab lastralab moved this from In Progress to Todo in Demo Mar 21, 2024
@lastralab
Copy link
Owner Author

Backend configuration:
image

CLI
image
image

Queue message
"[{\"customer_id\":\"1\",\"customer_ip\":\"100.68.10.31\"}]"

Flag table

+---------+-----------------------+---------------+
| flag_id | flag_code             | flag_data     |
+---------+-----------------------+---------------+
|      11 | 1_remote_address      | "100.68.10.31" |
|      12 | 1_weather_temperature | 23.1          |
+---------+-----------------------+---------------+

@lastralab lastralab moved this from Todo to In Progress in Demo May 31, 2024
@lastralab lastralab pinned this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

1 participant