Why is the address not deleted on user delete?

  • Posts: 114
  • Thank you received: 4
10 years 2 months ago #168835

-- url of the page with the problem -- : db
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3
-- PHP version -- : 5.4
-- Browser(s) name and version -- : FF30
-- Error-message(debug-mod must be tuned on) -- : none

When I delete a user in the Joomla user manager the row in hikashop_user gets deleted too but the row in hikashop_address stays there (although all fields are set to NULL). Why is that?

cheers

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #168840

Hi,

I checked the code, and if the customer hasn't orders he's deleted and his addresses should be deleted too.
Actually I don't understand why the values are set to "NULL".

If no orders, deleted, else, unpublished. But we don't change the values.
Don't you have any plugin which could do this modification before our edition ?
A plugin based on the function "onBeforeAddressDelete()" or "onBeforeUserDelete()", ...

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 4
10 years 2 months ago #168904

... I don't have "onBeforeAddressDelete()" or "onBeforeUserDelete()", but I add the user address to the Hika address table with a Community Bilder auto action onAfterRegistration. That should not affect the way how the address row is deleted by your code, right?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #168920

Hi,

I don't know how Community Builder add the address to the user, if it create a hikashop user entry in the hikashop_user table too. That's maybe there that the problem is. Because we use the hikashop user id for the hikashop address table.

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 4
10 years 2 months ago #169024

I checked and the hika user table is not touched by CB. Hika has its own plugin to add users when a user gets created in Joomla. The CB plugin kicks in after the Hika plugin has added the new user and looks for user_id and user_cms_id in _hikashop_user and adds the corresponding address to _hikashop_address. I think the glitch cannot come from that place.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 months ago #169040

As Xavier said in his first message, the address won't be deleted if it is used for an order. So it probably explains why you still have the address while the user has been deleted.
Otherwise, it could also happen if the user synchronization plugin of HikaShop had been disabled.

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 4
10 years 2 months ago #169122

"the address won't be deleted if it is used for an order."
==> I know, but there are no orders at all in my system yet, and even if it would not explain why all the columns for the address in question get overriden and are set to NULL

"user synchronization plugin of HikaShop had been disabled"
==> it is enabled

so question remains, why is this happening?

cheers

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #169725

Hi,

Backend access to your website could help us to investigate this problem and find from where the problem come.
Thanks to send it via private message with the url of that topic.

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum