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

Customer addresses persist in the XML even after deletion from FO or BO ( WEBSERVICES ) #36181

Closed
2 tasks done
NicolaMazzaferroCoimaf opened this issue May 17, 2024 · 5 comments
Labels
Invalid Resolution: issue closed because invalid

Comments

@NicolaMazzaferroCoimaf
Copy link

Prerequisites

Describe the bug and add attachments

If I delete an address from a user's profile, it doesn't actually delete in the database and therefore my xml has saved addresses that my users don't have.
Screenshot 2024-05-17 094904
Screenshot 2024-05-17 095058

Expected behavior

When I delete an address from my profile it should also be deleted in the API

Steps to reproduce

  1. Create user
  2. Add Address
  3. Delete Address
  4. Check www.site.it/api/addresses

PrestaShop version(s) where the bug happened

8.1.5

PHP version(s) where the bug happened

No response

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

@NicolaMazzaferroCoimaf NicolaMazzaferroCoimaf added Bug Type: Bug New New issue not yet processed by QA labels May 17, 2024
@Hlavtox
Copy link
Contributor

Hlavtox commented May 20, 2024

Address is not deleted permamently sometimes, but only softdeleted - flagged with deleted = 1 in the database. That's the reason why you see some more addresses in the XML.

@NicolaMazzaferroCoimaf
Copy link
Author

NicolaMazzaferroCoimaf commented May 20, 2024

Address is not deleted permamently sometimes, but only softdeleted - flagged with deleted = 1 in the database. That's the reason why you see some more addresses in the XML.

Right! I hadn't noticed deleted = 1

In this case I can manage via 1 - 0.

Besides this solution, can I make sure that an address is permanently deleted?

@paulnoelcholot
Copy link

FYI @PrestaShop/product-council

What do you think about that? Bug? Feature? Expected behavior?

@paulnoelcholot paulnoelcholot added PM ✔️ Status: check done, behavior approved NMI Status: issue needs more information 8.1.x Branch Waiting for PM Status: action required, waiting for product feedback and removed New New issue not yet processed by QA PM ✔️ Status: check done, behavior approved labels May 21, 2024
@Hlavtox
Copy link
Contributor

Hlavtox commented May 21, 2024

@NicolaMazzaferroCoimaf If it doesn't appear in the XML, it's deleted.

If there is an order for this adress = soft delete.
If there is no order for this address = permanent delete. :-)

@Hlavtox Hlavtox closed this as completed May 21, 2024
@Hlavtox Hlavtox added Invalid Resolution: issue closed because invalid and removed Waiting for PM Status: action required, waiting for product feedback NMI Status: issue needs more information Bug Type: Bug 8.1.x Branch labels May 21, 2024
@NicolaMazzaferroCoimaf
Copy link
Author

@NicolaMazzaferroCoimaf If it doesn't appear in the XML, it's deleted.

If there is an order for this adress = soft delete. If there is no order for this address = permanent delete. :-)

Yes, I mean if I use deleted = 1/0 I do a soft delete.

To do a permanent delete I can simply use:


    $webService->delete([
        'resource' => 'addresses',
        'id' => $id,
    ]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Resolution: issue closed because invalid
Projects
None yet
Development

No branches or pull requests

3 participants