# Changelog

- 10th November 2021 - 2.2.0 : fixed redirection for users logging in from checkout
- 10th November 2021 - 2.2.1 : make Lightregister element selector wider to include `body.template-suffix-lightregister`
- 10th November 2021 - 2.2.2 : add `vp-cart-total-discount` (`total_discount` in the API) and `vp-cart-total-discount-with-compare-at` (`total_discount_with_compare_at` in the API) in cart.
- 10th November 2021 - 2.2.3 : fix "regular" login page potentially when VPs are activated and input ids don't correspond to previously set id selectors. + display `vp-cart-total-discount` and `vp-cart-total-discount-with-compare-at` only if there are cart-level promotions
- 17th November 2021 - 2.2.4 : Hotfix Lightregister not redirecting on Firefox
- 18th November 2021 - 2.2.5 : Remove any previously setup submit action from login and customer lightregister forms (which enabled to remove hotfix from 2.2.4)
- 18th November 2021 - 2.2.6 : Fix product page prices updating when drawer cart quantities are updated
- 1st December 2021 - 2.2.7 : Add checklist + add lightregister translations + replace lightregister media queries with generic ones 
- 14th February - 3.0 : Add coupons
- 15th February - 3.1 : 
  - Get latest version of coupons from localStorage when sending request to `cart` in `initDraftOrder`
  - remove coupons that don't apply anymore when cart content is updated
  - keep track of valid coupons that don't apply to cart's current content (and display customer feedback accordingly)
- 23rd March - 3.1.1 : broaden lightregister selector so that it catches `body.lightregister--template` as well.
- 19th May 2022 = 3.2.0 : Implement fidelity coupons on cart page
- 23rd May 2022 = 4.0.0 : 
  - Add fidelity coupons
  - Fix rounding issue for `%` (39% displayed instead of 40%)
  - Add translations
  - Change fidelity endpoint from `/theoz/fidelity/coupons?site=${shopName}&user=${USER_ID}` to `/theoz/fid/coupons?shop=${shopName}&userId=${USER_ID}`
- 25th May 2022 = 4.0.1 : Fix coupons not being sent when local storage is empty
- 25th May 2022 = 4.0.2 : Verify coupon list length before sending it
- 6th June 2022 = 4.0.3 : remove all coupons (incl. fidelity coupons) from local storage on checkout button click
- 15th June 2022 = 4.1.0 :
  - Fix conflict with CookiePro
  - Add "From" on collection page products when `min_price` and `max_price` vary
  - When running `runOnHandles`, compare `min_price` with `min_compare_at_price` instead of `max_compare_at_price`
- 6th September 2022 = 4.2.0 : add possibility to show absolute discount amounts (eg. `-5€`) instead of `%`.
- 7th September 2022 = 4.2.1 : add possibility to show absolute discount amounts (eg. `-5€`) instead of `%`. -> fix display for CHF
- 7th September 2022 = 4.2.2 : only display coupons in `consumed_coupons` on cart pages
- 10th February 2023 = 4.6.0 : add vp data layer and related events
- 18th December 2023 = 4.6.3 : do not stop the propagation immediately
- 26th June 2024 = 4.8.0 : add support for the checkout extensibility, switch to cart v3 API
