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

Fix check and assignment of orderId #26

Merged
merged 2 commits into from
May 10, 2021
Merged

Fix check and assignment of orderId #26

merged 2 commits into from
May 10, 2021

Conversation

lllHuber
Copy link
Collaborator

@lllHuber lllHuber commented May 9, 2021

Previously, orderId would have been a boolean (true) if $session->qentaCartId
was set. This caused a problem with ::setCartOrderId($orderId) which translated
"true" into "1" and getCartOrder() would then return the order with id 1 instead
of the actual order.

@lllHuber lllHuber requested a review from kaufmo May 9, 2021 17:42
Previously, orderId would have been a boolean (true) if $session->qentaCartId
was set. This caused a problem with setCartOrderId($orderId) which translated
"true" into "1" and getCartOrder() would then return the order with id 1 instead
of the actual order.
if (!$orderId = $session->qentaCartId && isset($_POST['babytuch_orderId'])) {
if ($session->qentaCartId) {
$orderId = $session->qentaCartId;
} else if (isset($_POST['babytuch_orderId'])) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there babytuch in the variable name ;)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it now

@lllHuber lllHuber merged commit bb4e285 into 1.0 May 10, 2021
@lllHuber lllHuber deleted the fix-check branch May 10, 2021 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants