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

Fixed the hook listener for the hook actionProductAttributeDelete & Removed hooks actionProductOutOfStock & registerGDPRConsent as hook listeners are not defined #106

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

Progi1984
Copy link
Member

@Progi1984 Progi1984 commented Feb 15, 2022

Questions Answers
Description? Fixed the hook listener for the hook actionProductAttributeDelete
Removed hooks actionProductOutOfStock & registerGDPRConsent as hook listeners are not defined
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Relative to PrestaShop/PrestaShop#19230
How to test? Install this branch

ps_emailalerts is not linked to hooks actionProductOutOfStock & registerGDPRConsent
In upgrade, hooks actionProductOutOfStock & registerGDPRConsent are unlinked.

When the hook actionProductAttributeDelete is triggered, the line is now correctly removed in the table mailalert_customer_oos

@Progi1984 Progi1984 changed the title Fixed the hook listener for the hook actionProductAttributeDelete Fixed the hook listener for the hook actionProductAttributeDelete & Removed hooks actionProductOutOfStock & registerGDPRConsent as hook listeners are not defined Feb 15, 2022
Copy link
Contributor

@jolelievre jolelievre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Progi1984

@florine2623 florine2623 self-assigned this Mar 2, 2022
Copy link
Contributor

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Progi1984 ,

Thanks for the PR !

Hooks actionProductOutOfStock & registerGDPRConsent are well removed ✅

Regarding the hook actionProductAttributeDelete, I don't have the same result as what you mentioned in the How to test section.

Here are the steps I followed :

  • In a combination product, add a combination A with 0 stock
  • Go to product page, add your email address in the email alert section
  • See a new line in table ps_mailalert_customer_oos
  • Go to product sheet and delete the combination A
  • Refresh your database page, line is still present in ps_mailalert_customer_oos

Could you confirm this is the wanted behavior or not ?
Thanks!

@florine2623 florine2623 added waiting for author Waiting for author and removed waiting for QA labels Mar 7, 2022
@Progi1984 Progi1984 added waiting for QA and removed waiting for author Waiting for author labels Mar 7, 2022
@Progi1984
Copy link
Member Author

@florine2623 This hook actionProductAttributeDelete is executed only when a product is removed.

@Progi1984 Progi1984 requested a review from florine2623 March 7, 2022 15:10
Copy link
Contributor

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Progi1984,
Thanks for the details.

Indeed, now when I delete my whole product and not just an attribute of a product, the line is deleted in the database ✅ the name of the hook is a little confusing ^^

Before I delete my product :
Screenshot 2022-03-07 at 18 09 01
After I delete my product :
Screenshot 2022-03-07 at 18 11 12

Thanks it is QA ✅

@Progi1984 Progi1984 merged commit 0caaf4b into PrestaShop:dev Mar 7, 2022
@Progi1984 Progi1984 deleted the issue19230 branch March 7, 2022 17:16
@Progi1984
Copy link
Member Author

Thanks @florine2623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants