Answers.Body: <p>I'm not sure I can tell you much more than the error messages are telling you, you need to update your twig code eg. in index.twig (line 6) where it says; <code>getPurchasableId()</code> change it to <code>getId()</code>.</p>
  
  <p>These errors are just warning you that a future version of Craft won't support them (I imagine it will be Craft 4, but could be sooner).</p>
  
  <p>Changing e-commerce systems based on this error would not be advised as it's a very simple fix! </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-22T14:32:24.363Z
Answers.Text: Thank you so much. I am new to Craft and Twig and we have a third party helping us get all this setup in a staging environment before we deploy to our primary server. So, it's not alarming. I really appreciate you getting back to me so fast.
Answers.UserDisplayName: Sam Sumpter
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-23T10:22:41.850Z
Answers.Text: @SamSumpter can you mark this question as answered?
Answers.UserDisplayName: darylknight
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-22T14:29:25.883Z
Answers.LastActivityDate: 2019-10-22T14:29:25.883Z
Answers.UserDisplayName: dmatthams
Body: <p>We are in development of our new site in Craft 3 and we are getting some deprecation errors. This is keeping us from using Craft Commerce for our ordering page. Any suggestions on how to fix this?</p>
  
  <pre><code>Message Origin  Last Occurrence Stack Trace 
  The Purchasable::getPurchasableId() function has been deprecated. Use Purchasable::getId() instead. /srv/captioncall/templates/buy/index.twig:6 Yesterday   Stack Trace 
  craft.session.getFlash() has been deprecated. Use craft.app.session.getFlash() instead. /srv/captioncall/templates/buy/index.twig:33    Yesterday   Stack Trace 
  craft.session.getFlash() has been deprecated. Use craft.app.session.getFlash() instead. /srv/captioncall/templates/buy/index.twig:34    Yesterday   Stack Trace
  </code></pre>
  
Tags: <craft3><error-message><deprecation>
Title: Deprecation Errors - How to Fix?
ThreadText: # Deprecation Errors - How to Fix?
  
  (Asked by: username_0 on 2019-10-22)
  
  We are in development of our new site in Craft 3 and we are getting some deprecation errors. This is keeping us from using Craft Commerce for our ordering page. Any suggestions on how to fix this?
  
  ```
  Message Origin  Last Occurrence Stack Trace 
  The Purchasable::getPurchasableId() function has been deprecated. Use Purchasable::getId() instead. /srv/captioncall/templates/buy/index.twig:6 Yesterday   Stack Trace 
  craft.session.getFlash() has been deprecated. Use craft.app.session.getFlash() instead. /srv/captioncall/templates/buy/index.twig:33    Yesterday   Stack Trace 
  craft.session.getFlash() has been deprecated. Use craft.app.session.getFlash() instead. /srv/captioncall/templates/buy/index.twig:34    Yesterday   Stack Trace
  
  ```
  
  **Tags:** craft3, error-message, deprecation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-22. Score: 2
  
  I'm not sure I can tell you much more than the error messages are telling you, you need to update your twig code eg. in index.twig (line 6) where it says; `getPurchasableId()` change it to `getId()`.
  
  These errors are just warning you that a future version of Craft won't support them (I imagine it will be Craft 4, but could be sooner).
  
  Changing e-commerce systems based on this error would not be advised as it's a very simple fix!
  
  > **Comments:**
  > **username_0**: Thank you so much. I am new to Craft and Twig and we have a third party helping us get all this setup in a staging environment before we deploy to our primary server. So, it's not alarming. I really appreciate you getting back to me so fast.  
  > **username_2**: @username_0 can you mark this question as answered?  
  
  ---
  
  