Answers.Body: <p>Based on your tag, I assume you're using Commerce 2.</p>
  
  <p>Controller <a href="https://docs.craftcms.com/v3/changes-in-craft-3.html#request-params" rel="nofollow noreferrer">actions in Craft 3 use <code>kebab-case</code></a>, now, so your action should be <code>commerce/cart/update-cart</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-22T05:35:23.290Z
Answers.Text: Thanks—now I'm not getting an error, but nothing gets added to the cart, and instead of the cart redirect I get sent to the homepage.
Answers.UserDisplayName: Anders
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-22T08:03:28.360Z
Answers.Text: Somehow managed to sort it out with purchasable.purchasableId instead of purchasable.getId, but the redirect is still wrong...
Answers.UserDisplayName: Anders
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-22T02:38:28.877Z
Answers.LastActivityDate: 2018-07-23T21:51:23.130Z
Answers.LastEditDate: 2018-07-23T21:51:23.130Z
Answers.UserDisplayName: August Miller
Answers.Body: <p>Ah, my bad—not as simple as copy-pasting from Commerce 1 (duh). Some aspects have changed, like kebab-case and {{ redirectInput('shop/cart') }}</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-22T08:16:31.423Z
Answers.LastActivityDate: 2018-07-24T17:00:12.443Z
Answers.LastEditDate: 2018-07-24T17:00:12.443Z
Answers.UserDisplayName: Anders
Body: <p>Adding products to the cart throws a page not found (404) error that has this header;</p>
  
  <pre><code>Page not found.
  ↵
  Caused by: Invalid Route – yii\base\InvalidRouteException
  Unable to resolve the request: commerce/cart/updateCart
  in /Users/a/Sites/ae-dev/vendor/yiisoft/yii2/base/Controller.php at line 128
  </code></pre>
  
  <p>Very strange. Anyone encounter this issue?</p>
  
Tags: <plugin-craftcommerce><craft3>
Title: commerce/cart/updateCart throws page not found
ThreadText: # commerce/cart/updateCart throws page not found
  
  (Asked by: username_0 on 2018-07-22)
  
  Adding products to the cart throws a page not found (404) error that has this header;
  
  ```
  Page not found.
  ↵
  Caused by: Invalid Route – yii\base\InvalidRouteException
  Unable to resolve the request: commerce/cart/updateCart
  in /Users/a/Sites/ae-dev/vendor/yiisoft/yii2/base/Controller.php at line 128
  
  ```
  
  Very strange. Anyone encounter this issue?
  
  **Tags:** plugin-craftcommerce, craft3
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-07-22. Score: 3 | Accepted answer
  
  Based on your tag, I assume you're using Commerce 2.
  
  Controller [actions in Craft 3 use `kebab-case`](https://docs.craftcms.com/v3/changes-in-craft-3.html#request-params), now, so your action should be `commerce/cart/update-cart`.
  
  > **Comments:**
  > **username_0**: Thanks—now I'm not getting an error, but nothing gets added to the cart, and instead of the cart redirect I get sent to the homepage.  
  > **username_0**: Somehow managed to sort it out with purchasable.purchasableId instead of purchasable.getId, but the redirect is still wrong...  
  
  ---
  
  ### Answer by username_0 on 2018-07-22. Score: 1
  
  Ah, my bad—not as simple as copy-pasting from Commerce 1 (duh). Some aspects have changed, like kebab-case and {{ redirectInput('shop/cart') }}
  
  
  ---
  
  