Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cart available from EVENT_MODIFY_CART_INFO #1536

Closed
sjelfull opened this issue Jun 24, 2020 · 1 comment
Closed

Make cart available from EVENT_MODIFY_CART_INFO #1536

sjelfull opened this issue Jun 24, 2020 · 1 comment

Comments

@sjelfull
Copy link
Contributor

What are you trying to do?
I'm trying to add extra info to the returned cart, and the info is pulled via a behavior on the order.

However, the cart isn't available on the event, so we can't access any behaviors, dynamic properties etc.

What's your proposed solution?
Pass cart with the event.

@lukeholder
Copy link
Member

Thanks for reporting that! I’ve just fixed it for the next release.

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "dev-develop#1ce5e59b7a7489a24848c32f70a7dfccca1cf052 as 3.1.10",
  "...": "..."
}

Then run composer update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants