Answers.Body: <p>I have confirmed this would indeed appear to be a bug in Commerce.</p>
  
  <p>A quick workaround would be to listen to login events and call some sort of update cart hack, but this is really a fix that should happen at the Commerce end of things.</p>
  
  <p>I'll report it.</p>
  
  <p>EDIT: Luke Holder comfirms he's found the bug and it will be fixed in the next point release coming soon.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-14T00:43:09.673Z
Answers.LastActivityDate: 2017-06-14T06:56:17.927Z
Answers.LastEditDate: 2017-06-14T06:56:17.927Z
Answers.UserDisplayName: Jeremy Daalder
Body: <p>I assign users to specific user groups and then I created discounts that are applied to orders based on the user groups that the users are in. </p>
  
  <p>I have a scenario where users add items to their cart while they are not logged in. Then when they are ready to do the checkout I show a login or registration page. The user then logs in and is then redirected to the view-cart page.</p>
  
  <p>When they get to the view cart page there are no discounts applied. Discounts are only applied when an item is added or removed from the cart.</p>
  
  <p>How can I reevaluate and recalculate any applicable discounts based on the user groups the user is in when the user logs in?</p>
  
Tags: <plugin-craftcommerce><discounts>
Title: Apply discount on login during commerce checkout process
ThreadText: # Apply discount on login during commerce checkout process
  
  (Asked by: username_0 on 2017-06-13)
  
  I assign users to specific user groups and then I created discounts that are applied to orders based on the user groups that the users are in.
  
  I have a scenario where users add items to their cart while they are not logged in. Then when they are ready to do the checkout I show a login or registration page. The user then logs in and is then redirected to the view-cart page.
  
  When they get to the view cart page there are no discounts applied. Discounts are only applied when an item is added or removed from the cart.
  
  How can I reevaluate and recalculate any applicable discounts based on the user groups the user is in when the user logs in?
  
  **Tags:** plugin-craftcommerce, discounts
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-14. Score: 0 | Accepted answer
  
  I have confirmed this would indeed appear to be a bug in Commerce.
  
  A quick workaround would be to listen to login events and call some sort of update cart hack, but this is really a fix that should happen at the Commerce end of things.
  
  I'll report it.
  
  EDIT: Luke Holder comfirms he's found the bug and it will be fixed in the next point release coming soon.
  
  
  ---
  
  