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

Check if selected address belongs to user #14444

Merged
merged 2 commits into from Jul 3, 2019

Conversation

@PierreRambaud
Copy link
Contributor

commented Jul 1, 2019

Questions Answers
Branch? 1.7.6.x
Description? The selected address during checkout process must be owned by the connected user.
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
How to test? Try to change the input id in your developper console.
image

This change is Reviewable

@PierreRambaud PierreRambaud requested a review from PrestaShop/prestashop-core-developers as a code owner Jul 1, 2019

@PierreRambaud PierreRambaud added this to the 1.7.6.0 milestone Jul 1, 2019

@PierreRambaud PierreRambaud changed the title Check if selected address is belongs to user Check if selected address belongs to user Jul 1, 2019

@@ -71,25 +71,6 @@ public function handleRequest(array $requestParams = array())
}
}
if (isset($requestParams['id_address_delivery'])) {

This comment has been minimized.

Copy link
@Quetzacoalt91

Quetzacoalt91 Jul 1, 2019

Member

I don't know all the whole process work, but removing these tests from here may break an existing feature don't you think?

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud Jul 1, 2019

Author Contributor

It's not remove but move to the bottom. You will able to set a delivery adress even if you're not in confirm context.

This comment has been minimized.

Copy link
@Quetzacoalt91

Quetzacoalt91 Jul 2, 2019

Member

How is that even possible if you're moving these checks inside a whole } elseif (isset($requestParams['confirm-addresses'])) {?

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud Jul 2, 2019

Author Contributor

Because these variables exist only in confirm-addresses context

Use if, because the request is execute twice to go to the next step w…
…hen you add an address for the first time
@matks

matks approved these changes Jul 3, 2019

@matks matks added the waiting for QA label Jul 3, 2019

@sarahdib sarahdib added QA ✔️ and removed waiting for QA labels Jul 3, 2019

@matks

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

Thank you @PierreRambaud

@matks matks merged commit d1726e8 into PrestaShop:1.7.6.x Jul 3, 2019

2 checks passed

PrettyCI Code formatting
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@PierreRambaud PierreRambaud deleted the PierreRambaud:fix/checkout-addresses branch Jul 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.