Body: <p>I have a pretty critical issue with one of my clients websites.</p>
  
  <p>The site, running Craft CMS 2.7.2 and craft commerce 1.2.1364, uses a event/tickets plugin and uses Mollie as the payment provider.</p>
  
  <p><strong>The problem is the following:</strong></p>
  
  <p>A customer goes to the site, selects an event and adds 2 tickets to their cart. The customer goes through checkout, pays for 2 tickets successfully and returns back to the site, but receives 4 tickets.</p>
  
  <p>The only difference between this bugged order and a normal order (that I can tell anyway) is the status updates. A normal order will have only one status update but bugged orders have three updates in the orderhistory (see screenshot)
  <a href="https://i.sstatic.net/6vqh1.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6vqh1.jpg" alt="screenshot of a bugged order"></a>
  This order has purchased and paid for 7 tickets but has received 14 tickets.</p>
  
  <p>The problem seems to be happening randomly from what I can tell.</p>
  
  <p>Any help or information about what the problem could be would be much appreciated.</p>
  
  <p><em>(Note: we have contacted the plugin owner but have not yet received a response. We also contacted craft support but awaiting a response decided to ask here as well). If we receive any answer/solution we will post it below.</em></p>
  
  <hr>
  
  <p><strong>UPDATE: This is the response from Craft support:</strong></p>
  
  <p>Hi Yoshi,</p>
  
  <p>Something in your site setup, or a plugin, is setting the orderStatusId on the order to one that triggers an email. Somehow the status is being set twice.</p>
  
  <p>My guess is, without seeing the email setup or the plugin, that since the same status is set twice, the emails are sending twice. That makes sense, but my guess is that the emails themselves generate the ticket numbers on send, hence the additional tickets being issued.</p>
  
  <p>The plugin developer should have saved the tickets numbers on order complete, and linked them to the order. Then the email could be sent out as many times as needed, without it regenerating multiple ticket numbers.</p>
  
  <p>Hope that helps.</p>
  
  <p>-Luke</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-13T01:55:43.927Z
Comments.Text: In your screenshot where are the 14 tickets referenced?
Comments.UserDisplayName: Luke Holder
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-13T11:40:59.727Z
Comments.Text: @LukeHolder You can't tell from the screenshot. Though, in it you can see 7 tickets have been bought for €35 each (which equals €245). However, in the mail that gets send after the purchase and in the order success page where the customer gets send to after the payment I loop over the purchased tickets. It is in those loops that double the amount of tickets get shown (14 in this case). And it's not just every ticket shown twice, it's 14 different, valid tickets that have been created.
Comments.UserDisplayName: Mosh
Tags: <plugin-craftcommerce><error><payment-methods>
Title: Some orders recieve double amount of products
ThreadText: # Some orders recieve double amount of products
  
  (Asked by: username_0 on 2018-09-12)
  
  I have a pretty critical issue with one of my clients websites.
  
  The site, running Craft CMS 2.7.2 and craft commerce 1.2.1364, uses a event/tickets plugin and uses Mollie as the payment provider.
  
  **The problem is the following:**
  
  A customer goes to the site, selects an event and adds 2 tickets to their cart. The customer goes through checkout, pays for 2 tickets successfully and returns back to the site, but receives 4 tickets.
  
  The only difference between this bugged order and a normal order (that I can tell anyway) is the status updates. A normal order will have only one status update but bugged orders have three updates in the orderhistory (see screenshot)
  [![screenshot of a bugged order](https://i.sstatic.net/6vqh1.jpg)](https://i.sstatic.net/6vqh1.jpg)
  This order has purchased and paid for 7 tickets but has received 14 tickets.
  
  The problem seems to be happening randomly from what I can tell.
  
  Any help or information about what the problem could be would be much appreciated.
  
  *(Note: we have contacted the plugin owner but have not yet received a response. We also contacted craft support but awaiting a response decided to ask here as well). If we receive any answer/solution we will post it below.*
  
  ---
  
  **UPDATE: This is the response from Craft support:**
  
  Hi Yoshi,
  
  Something in your site setup, or a plugin, is setting the orderStatusId on the order to one that triggers an email. Somehow the status is being set twice.
  
  My guess is, without seeing the email setup or the plugin, that since the same status is set twice, the emails are sending twice. That makes sense, but my guess is that the emails themselves generate the ticket numbers on send, hence the additional tickets being issued.
  
  The plugin developer should have saved the tickets numbers on order complete, and linked them to the order. Then the email could be sent out as many times as needed, without it regenerating multiple ticket numbers.
  
  Hope that helps.
  
  -username_1
  
  **Tags:** plugin-craftcommerce, error, payment-methods
  
  > **Comments:**
  > **username_1**: In your screenshot where are the 14 tickets referenced?  
  > **username_0**: @username_1 You can't tell from the screenshot. Though, in it you can see 7 tickets have been bought for €35 each (which equals €245). However, in the mail that gets send after the purchase and in the order success page where the customer gets send to after the payment I loop over the purchased tickets. It is in those loops that double the amount of tickets get shown (14 in this case). And it's not just every ticket shown twice, it's 14 different, valid tickets that have been created.  
  
  ---
  
  ## 0 answers
  
  