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

Adds actionObjectProductCommentAddAfter action hook #139

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

samberrry
Copy link

@samberrry samberrry commented May 10, 2022

Questions Answers
Description? This action hook is necessary for this feature: PrestaShop/ps_facetedsearch#569. In PostComment front controller the PostComment entity is being used instead of ObjectModel, so we do not get addAfter event.
Type? new feature
BC breaks? no
Deprecations? no
Fixed ticket? n/a, developer feature
How to test? after adding a comment from front office hook "actionObjectProductCommentAddAfter" should be executed

Copy link
Contributor

@kpodemski kpodemski left a comment

Choose a reason for hiding this comment

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

Hey @samberrry

Thanks! Sorry for the late reply. Let's move this topic of Faceted search improvements forward :)

I've added a minor suggestion to be more explicit with the argument.

Also, could you please create a simple feature request with the link to your two PRs and a description so we can have it validated by the QA?

controllers/front/PostComment.php Outdated Show resolved Hide resolved
Co-authored-by: Krystian Podemski <kpodemski@users.noreply.github.com>
@samberrry
Copy link
Author

Hey @samberrry

Thanks! Sorry for the late reply. Let's move this topic of Faceted search improvements forward :)

I've added a minor suggestion to be more explicit with the argument.

Also, could you please create a simple feature request with the link to your two PRs and a description so we can have it validated by the QA?

Hey @kpodemski,
I'm seeing your great contributions. Thank you everybody ;)

Yes, let's move it.

And, where should I create the feature request? on the ps_facetedsearch repo?

@kpodemski kpodemski added this to the 5.0.3 milestone Dec 12, 2022
@Hlavtox
Copy link
Contributor

Hlavtox commented Dec 12, 2022

@kpodemski @samberrry I see one problematic thing here guys.

This hook normally sends the ObjectModel instance as a parameter (Hook::exec('actionObject' . $this->getFullyQualifiedName() . 'AddAfter', array('object' => $this));), but here we send an array (obviously, because it's not using ObjectModel). Wouldn't it create some confusion?

@kpodemski
Copy link
Contributor

@Hlavtox, you're absolutely right, I guess it'll be enough o pass $productComment

@Hlavtox Hlavtox modified the milestones: 5.0.3, 5.0.4 Mar 6, 2023
@Hlavtox Hlavtox modified the milestones: 5.0.4, 6.0.0 Jul 20, 2023
@leemyongpakvn leemyongpakvn modified the milestones: 6.0.0, 6.0.1 Aug 24, 2023
@matks matks removed this from the 6.0.1 milestone Aug 30, 2023
@leemyongpakvn leemyongpakvn added this to the 6.0.3 milestone Aug 31, 2023
@leemyongpakva leemyongpakva removed this from the 6.0.3 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants