xertion Posted October 8, 2015 Share Posted October 8, 2015 (edited) So we've been having this issue for years now throughout multiple versions. In something like 1 out of 100 orders, the customer address of an order gets replaced by some other user's address. This has been happening over 2 different payment modules so it's not isolated to a specific module. I can't replicate it over and over again. But since we're having ~80,000 orders. That's a lot of orders with wrong addresses even if it only happens occasionally... So what happens is the following... A customer places an order using address "John Doe, King Street 1, London" and in the backend the address of the order becomes "Jimmy Johnsson, Queens Street, Manchester" (A address already in the database, belonging to a completely other customer who placed an order 5 years ago). See screenshot attached or link below: http://imgur.com/MxwZ32R (Blurred out some private information about the customer, but you can see the addresses are completely different). Also as you can see here (http://imgur.com/EfZLhGR) the address that is set to the order, does not even exist in the list of addresses belonging to the customer. You can also see that the REAL address that was entered during checkout is saved and placed in the list of customer addresses. But the "active" address of the order is an address that has nothing to do with the current customer to do at all. Usually it is the same 2-3 address that keep coming back, all of them belonging to users from way back in time. We've been trying everything to figure this error out... Including looking through line-by-line of the payment modules to see if there is some hardcoded address ID in there somewhere... There's not. For anyone interested in one of the payment modules code, that handles the checkout and payment and saving of the addresses. You can see it here: http://paste.ofcode.org/T889rkuq6KEMu6EV4rfrAK As you can see. It uses the posted data from Tools::getValue();, creates a new address and then adds the id of the address to $cart->id_address_delivery and $cart->id_address_invoice. Perhaps there is some bug from updating Prestashop's database over and over again throughout the years of us using Prestashop and moving from version to version. Anyone ran into the same bug/error before? Ideas for solution? EDIT: After additional testing I found out something new. When I check $cart->id_address_invoice and $this->context->cart->id_address_invoice, they are different. For some reason, sometimes the $this->context->cart->id_address_invoice is set to a address that is very far back in time. In my case there are 100,000 addresses in the database that differs the context->cart->id_address_invoice from the cart->id_address_invoice. Now I tried to update the context cart by doing "$this->context->cart->id_address_invoice = $cart->id_address_invoice". It did not work though. Any ideas of how I should update the context->cart->id_address_invoice/id_address_delivery ? Edited October 8, 2015 by xertion (see edit history) Link to comment Share on other sites More sharing options...
Ramb0t Posted April 11, 2018 Share Posted April 11, 2018 We are having the same problem, would be interested if anyone has a solution? Looks similar to https://stackoverflow.com/questions/30505734/wrong-customer-address-in-orders-in-prestashop Link to comment Share on other sites More sharing options...
nomealternativo Posted April 4, 2019 Share Posted April 4, 2019 Same problem here: did you guys find a solution? Link to comment Share on other sites More sharing options...
kllif Posted April 15, 2020 Share Posted April 15, 2020 I have the same problem, anyone has a solution? Link to comment Share on other sites More sharing options...
Ramb0t Posted April 15, 2020 Share Posted April 15, 2020 Nope still have the same issue, happens every 1000 orders or so.. Have never been able to recreate then issue or figure out what causes it. Link to comment Share on other sites More sharing options...
miguel_enigmo Posted December 13, 2021 Share Posted December 13, 2021 Hello, Any news on this? Having the same issue here. Not able to recreate the issue or solving it... (obviously) Any news, solution or ideas? Presta, please? Thanks a lot Link to comment Share on other sites More sharing options...
Ramb0t Posted December 13, 2021 Share Posted December 13, 2021 Nope still same issue... What version are you on? We still 1.6, I'm hoping the problem goes away when we go to 1.7 eventually... I have a feeling it might have to do with one of the caches or maybe MySQL setup somehow. No idea how to test this however. Have tried turning caches off but doesnt help I dont think Link to comment Share on other sites More sharing options...
miguel_enigmo Posted December 13, 2021 Share Posted December 13, 2021 4 hours ago, Ramb0t said: Nope still same issue... What version are you on? We still 1.6, I'm hoping the problem goes away when we go to 1.7 eventually... I have a feeling it might have to do with one of the caches or maybe MySQL setup somehow. No idea how to test this however. Have tried turning caches off but doesnt help I dont think We are on 1.7.6.8, so unfortunately that's not the case Have tried turning caches off aswell, nothing changed. I've been replied in another post (about the same issue) pointing that it might have to do with messed up shopping cart ID's in database, which is solved in the next url: We are thinking about trying this. Still not sure about it tho. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now