-
Notifications
You must be signed in to change notification settings - Fork 1k
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
NEXT-31347 - BugFix: Update data type for AfterLineItemQuantityChangedEvent::getItems() #3392
Closed
bhardwajakshit
wants to merge
3
commits into
shopware:trunk
from
bhardwajakshit:bugfix/issue-3390/updated-data-type
Closed
NEXT-31347 - BugFix: Update data type for AfterLineItemQuantityChangedEvent::getItems() #3392
bhardwajakshit
wants to merge
3
commits into
shopware:trunk
from
bhardwajakshit:bugfix/issue-3390/updated-data-type
+14
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…dEvent::getItems()
|
Hello, thank you for creating this pull request. Please use this issue to track the state of your pull request. |
bhardwajakshit
changed the title
BugFix: Issue 3390 - Update data type for AfterLineItemQuantityChangedEvent::getItems()
BugFix: NEXT-31347 - Update data type for AfterLineItemQuantityChangedEvent::getItems()
Oct 26, 2023
bhardwajakshit
changed the title
BugFix: NEXT-31347 - Update data type for AfterLineItemQuantityChangedEvent::getItems()
NEXT-31347 - BugFix: Update data type for AfterLineItemQuantityChangedEvent::getItems()
Oct 26, 2023
I've just merged this, will be part of the next release. Thank you for your contribution @bhardwajakshit 🎉 |
mitelg
added
Accepted
hacktoberfest-accepted
PR is accepted by us for Hacktoberfest
and removed
Incomplete
Scheduled
labels
Nov 2, 2023
DrUlysses
pushed a commit
to DrUlysses/platform
that referenced
this pull request
Nov 3, 2023
…uantityChangedEvent::getItems() fixes shopware#3392
DrUlysses
pushed a commit
to DrUlysses/platform
that referenced
this pull request
Nov 9, 2023
…uantityChangedEvent::getItems() fixes shopware#3392
6 tasks
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1. Why is this change necessary?
2. What does this change do, exactly?
3. Describe each step to reproduce the issue or behaviour.
Add a Subscriber for AfterLineItemQuantityChangedEvent.
Subscriber should call AfterLineItemQuantityChangedEvent::getItems()
`class LineItemQuantityChangedSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
AfterLineItemQuantityChangedEvent::class => 'onLineItemQuantityChange'
];
}
public function onLineItemQuantityChange(AfterLineItemQuantityChangedEvent $event): void
{
foreach ($event->getItems() as $itemToUpdate) {
$lineItem->getPayload();
}
}
}`
Change Qty in Cart.
Error appears cannot call getPayload() on array
4. Please link to the relevant issues (if any).
Issue - [3390]
5. Checklist
🤖 Generated by Copilot at 4f80101
Modified the
AfterLineItemQuantityChangedEvent
class to include more details about the line items and their quantity changes. This allows event subscribers to access and use more information about the cart changes triggered by the event.🤖 Generated by Copilot at 4f80101
items
property and parameter in theAfterLineItemQuantityChangedEvent
class to store additional information about the line items (link, link, link)