<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>

CC BY-SA 4.0
2018-07-22T05:35:23.290Z
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.
Anders
CC BY-SA 4.0
2018-07-22T08:03:28.360Z
Somehow managed to sort it out with purchasable.purchasableId instead of purchasable.getId, but the redirect is still wrong...
Anders
CC BY-SA 4.0
2018-07-22T02:38:28.877Z
2018-07-23T21:51:23.130Z
2018-07-23T21:51:23.130Z
August Miller
<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>

CC BY-SA 4.0
2018-07-22T08:16:31.423Z
2018-07-24T17:00:12.443Z
2018-07-24T17:00:12.443Z
Anders
<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>

<plugin-craftcommerce><craft3>
commerce/cart/updateCart throws page not found
# 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') }}


---

