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
2603482 order language behavior #352
base: 8.x-2.x
Are you sure you want to change the base?
2603482 order language behavior #352
Conversation
…getter setter for the language
modules/cart/src/CartManager.php
Outdated
@@ -56,6 +64,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Lin | |||
$this->lineItemStorage = $entity_type_manager->getStorage('commerce_line_item'); | |||
$this->lineItemMatcher = $line_item_matcher; | |||
$this->eventDispatcher = $event_dispatcher; | |||
$this->languageManager = \Drupal::languageManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update services.yml
to inject this into the service. Update create
method to get it from service, make it an argument.
Hi @mglaman, I have updated the code. Regards |
65e29ab
to
5830fc3
Compare
0720d3a
to
821711d
Compare
ae8f1aa
to
b40d0af
Compare
modules/cart/src/CartManager.php
Outdated
// If the language is different, we need to save it again. If we are already | ||
// planning to trigger the save, there is no need to do the additional | ||
// checks. | ||
if (!$needs_cart_save && $cart->getLanguage()->getId() <> $this->languageManager->getCurrentLanguage()->getId()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any usage of <>
in the php code, I think this should be replaced by !==
424752f
to
b5cc4b2
Compare
c89efa0
to
3944b06
Compare
c54a308
to
85d9f2e
Compare
f72b292
to
2503a92
Compare
5a36359
to
6602c62
Compare
This needs a re-roll, then we can do an updated review. |
68e6e5f
to
ac287b7
Compare
3f9b894
to
41b705b
Compare
…-order-language-behavior
41b705b
to
a64f773
Compare
I have updated the comments and rerolled onto latest 8.x |
6be1d5c
to
b8a7444
Compare
Hi,
I have made an attempt for the implementation that has the following requirements: