Answers.Body: <p>My bad - sorted it out by adding {{ getCsrfInput() }} - as per <a href="https://craftcms.com/support/csrf-protection" rel="nofollow noreferrer">https://craftcms.com/support/csrf-protection</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-23T09:52:23.790Z
Answers.LastActivityDate: 2017-06-23T09:52:23.790Z
Answers.UserDisplayName: Redbloc
Body: <p>I've been following the Craft Commerce tutorials at Mijingo, (running on CraftPro 2.6.2983) all good so far, except when I go add a product to my cart. I'm getting a "CSRF token could not be found" error.</p>
  
  <p>The debug message with dev mode on reads:</p>
  
  <blockquote>
    <p>Warning: Declaration of Craft\UserSessionService::login($username, $password, $rememberMe = false) should be compatible with CWebUser::login($identity, $duration = 0) in /Users/username/projectname/craft/app/services/UserSessionService.php on line 17</p>
    
    <p>Warning: Declaration of Craft\UserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in /Users/username/projectname/craft/app/services/UserSessionService.php on line 17</p>
  </blockquote>
  
  <p>Is there a step or setup option I'm missing? Atm, it's running on Mamp, but I want to make sure it's workable before I license up and go live. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-21T20:40:30.333Z
Comments.Text: Glad you got it sorted!  Would you mind adding your edit as an official answer in case someone else runs into it in the future?
Comments.UserDisplayName: Brad Bell
Tags: <plugin-craftcommerce>
Title: Craft Commerce - Bad Request The CSRF token could not be verified
ThreadText: # Craft Commerce - Bad Request The CSRF token could not be verified
  
  (Asked by: username_0 on 2017-06-21)
  
  I've been following the Craft Commerce tutorials at Mijingo, (running on CraftPro 2.6.2983) all good so far, except when I go add a product to my cart. I'm getting a "CSRF token could not be found" error.
  
  The debug message with dev mode on reads:
  
  > Warning: Declaration of Craft\UserSessionService::login($username, $password, $rememberMe = false) should be compatible with CWebUser::login($identity, $duration = 0) in /Users/username/projectname/craft/app/services/UserSessionService.php on line 17
  >
  > Warning: Declaration of Craft\UserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in /Users/username/projectname/craft/app/services/UserSessionService.php on line 17
  
  Is there a step or setup option I'm missing? Atm, it's running on Mamp, but I want to make sure it's workable before I license up and go live.
  
  **Tags:** plugin-craftcommerce
  
  > **Comments:**
  > **username_1**: Glad you got it sorted!  Would you mind adding your edit as an official answer in case someone else runs into it in the future?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-06-23. Score: 4
  
  My bad - sorted it out by adding {{ getCsrfInput() }} - as per <https://craftcms.com/support/csrf-protection>
  
  
  ---
  
  