Answers.Body: <p>Confirmed by Luke this was due to a bug to be fixed in the next release of Commerce.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-15T03:40:00.590Z
Answers.LastActivityDate: 2017-06-15T03:40:00.590Z
Answers.UserDisplayName: Mike
Body: <p>We are setting up shipping methods and rules as follows:</p>
  
  <p>Methods: FedEx Standard, FedEx Priority, FedEx Overnight</p>
  
  <p>For each method we wanted to add the following rules: US, Canada, International</p>
  
  <p>However, when trying to add another rule for another Shipping Method, we get this error:</p>
  
  <p><code>CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Canada' for key 'craft_commerce_shippingrules_name_unq_idx'</code></p>
  
  <p>I assume we cannot have duplicate rule names across different methods? If so, this seems odd. Of course we can make each rule have a unique name (ex. US Standard, US Prioriy, etc) but it seems like unnecessary complication. Is that our only option?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-10T23:54:01.460Z
Comments.Text: I feel like I saw this go past on slack as a bug a while ago....& I thought​ Luke fixed it.... Are you running the latest Commerce?
Comments.UserDisplayName: Jeremy Daalder
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-11T06:14:42.040Z
Comments.Text: Interesting... yes, we are running the latest version and I wondered if it was possibly a bug. Maybe I'll send this in to support.
Comments.UserDisplayName: Mike
Tags: <plugin-craftcommerce><shipping>
Title: Same shipping rule name in different methods not allowed?
ThreadText: # Same shipping rule name in different methods not allowed?
  
  (Asked by: username_0 on 2017-06-10)
  
  We are setting up shipping methods and rules as follows:
  
  Methods: FedEx Standard, FedEx Priority, FedEx Overnight
  
  For each method we wanted to add the following rules: US, Canada, International
  
  However, when trying to add another rule for another Shipping Method, we get this error:
  
  `CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Canada' for key 'craft_commerce_shippingrules_name_unq_idx'`
  
  I assume we cannot have duplicate rule names across different methods? If so, this seems odd. Of course we can make each rule have a unique name (ex. US Standard, US Prioriy, etc) but it seems like unnecessary complication. Is that our only option?
  
  **Tags:** plugin-craftcommerce, shipping
  
  > **Comments:**
  > **username_1**: I feel like I saw this go past on slack as a bug a while ago....& I thought​ Luke fixed it.... Are you running the latest Commerce?  
  > **username_0**: Interesting... yes, we are running the latest version and I wondered if it was possibly a bug. Maybe I'll send this in to support.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-06-15. Score: 1 | Accepted answer
  
  Confirmed by Luke this was due to a bug to be fixed in the next release of Commerce.
  
  
  ---
  
  