dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
49 stars 63 forks source link

Customer Addressbook Preference - Delete from Address book fails #501

Closed Thomas-balance closed 6 years ago

Thomas-balance commented 6 years ago

Magento Cloud: 2.1.8 dotmailer: latest

Steps to reproduce:

  1. Set any address book to public
  2. dotmailer-extension config 'Customer Addressbook Preference' set to "Show Addressbooks to Customer" : "Yes" and select address book/s
  3. Save
  4. Flush Magento cache
  5. Login as customer
  6. View dashboard > Newsletter
  7. Deselect a ticket address book
  8. Save
  9. Check dotmailer UI for customer and see they are still in address book
  10. Refresh page View dashboard > Newsletter - see that it is still ticked
  11. Use dotmailer API to get a list of customers in the address book and see customer is still there
  12. Wait half an hour
  13. Repeat 9 - 11 and see that customer is still in the address book

Expected behaviour: When the customer deselects the address book and selects save, the customer is immediately removed from the selected address book/s

Other notes: Customer selecting an address book to be added to and saving, works fine.

simon-letch commented 6 years ago

Hey @Thomas-balance,

We have raised an internal issue for this and have a fix going through pull request at the moment.

I'll update again when we have released the fix.

Cheers, Simon

Thomas-balance commented 6 years ago

Hi @simon-letch

The problem is quite simple to fix.

Currently your extension is using the API incorrectly, it is passing the address book string name for the [AddressBookID], when it should be using the AddressBookID address-books/[AddressBookID]/contacts/[ContactID]

Thanks,

cdiacon commented 6 years ago

Hi @Thomas-balance ,

Thanks for your time and describe how to replicate the issue, very helpful 👍

So the issue you have described is fixed on the 2.4.5 version.

But I still can't find any trace of this one ? :

Currently your extension is using the API incorrectly, it is passing the address book string name for the [AddressBookID], when it should be using the AddressBookID
address-books/[AddressBookID]/contacts/[ContactID]

if you still think it's an issue feel free to open a new ticket.

Thanks, Calin.