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

Create a new hook 'hookActionProductGridDefinitionModifier' #28239

Closed
2 tasks done
kratekk opened this issue Apr 12, 2022 · 7 comments
Closed
2 tasks done

Create a new hook 'hookActionProductGridDefinitionModifier' #28239

kratekk opened this issue Apr 12, 2022 · 7 comments
Labels
BO Category: Back Office Feature Type: New Feature Hook Invalid Resolution: issue closed because invalid Modules Component: Which BO section is concerned No change required Resolution: issue closed because expected as is Old Products Page Concerns the old product page

Comments

@kratekk
Copy link

kratekk commented Apr 12, 2022

Prerequisites

Is your feature request related to a problem?

I am not really sure if is it the bug but this hook does not exist in newest Prestashop version 1.7.8.5
hookActionProductGridDefinitionModifier

I need it to develop my custom functions. Is that possible to add new items to bulk action list for Product list in admin?

Go to Product List in Admin -> add new custom bulk action

Describe the solution you'd like

$this->registerHook('actionProductGridDefinitionModifier')

public function hookActionProductGridDefinitionModifier(array $params)
{
$gridDefinition = $params['definition'];

    $gridDefinition->getBulkActions()->add(
            (new SubmitBulkAction('relate_products'))
                ->setName('Relate products')
                ->setOptions([
                    'submit_route' => 'admin_relation_products_list',
                ]) 
        );
}

Alternatives you've considered

No response

Additional context

No response

@kratekk kratekk added Bug Type: Bug New New issue not yet processed by QA labels Apr 12, 2022
@marwachelly
Copy link

Hello @kratekk,

I noticed that the hook ActionProductGridDefinitionModifier doesn't exist not only in 1.7.8.5 but also in all previous PS version and in the List of hooks in PrestaShop 1.7. Do you want to add a new hook?
Waiting for your feedback 😊

Thanks,

@marwachelly marwachelly added Waiting for author Status: action required, waiting for author feedback BO Category: Back Office NMI Status: issue needs more information Hook and removed New New issue not yet processed by QA labels Apr 12, 2022
@kratekk
Copy link
Author

kratekk commented Apr 12, 2022

Hi @marwachelly do you mean if I registered new hook? Yes

$this->registerHook('actionProductGridDefinitionModifier')

public function hookActionProductGridDefinitionModifier(array $params)
	{
	    $gridDefinition = $params['definition'];

	    $gridDefinition->getBulkActions()->add(
	            (new SubmitBulkAction('relate_products'))
	                ->setName('Relate products')
	                ->setOptions([
	                    'submit_route' => 'admin_relation_products_list',
	                ]) 
	        );
	}

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Apr 12, 2022
@marwachelly
Copy link

Hi @kratekk ,
So your issue is a new feature not a bug. Thank you for your suggestion. The Product Team will take it into consideration for future developments.
Please be aware that there is no guarantee that this feature will be developed anytime soon. If this is important to you, we strongly suggest you consider hiring a specialist to help you create it.

If you are willing to implement this feature into PrestaShop as a Pull Request, the teams will be happy to help you by ensuring that it is appropriate and coherent with the rest of the project. If that is the case, please let us know!

Thanks,

@marwachelly marwachelly added Feature Type: New Feature Needs Specs Status: issue needs to be specified Modules Component: Which BO section is concerned Old Products Page Concerns the old product page and removed Bug Type: Bug NMI Status: issue needs more information labels Apr 12, 2022
@hibatallahAouadni hibatallahAouadni changed the title hookActionProductGridDefinitionModifier does not exist in 1.7.8.5 Create a new hook 'hookActionProductGridDefinitionModifier' Apr 13, 2022
@hibatallahAouadni hibatallahAouadni added the Waiting for dev Status: action required, waiting for tech feedback label Apr 13, 2022
@hibatallahAouadni
Copy link
Contributor

Ping @PrestaShop/prestashop-core-developers wdyt about creating a new hook to add new items to bulk action list for Product list in admin?
Thanks in advance 🙏

@matks
Copy link
Contributor

matks commented Apr 13, 2022

Hello @kratekk in 8.0 we'll have a full new product list page, and it has as far as I know all the hooks you would need 😄 .

But your focus in on 1.7.8.5 . Unfortunately on 1.7.8.x versions we only deliver bug fixes and adding a hook would be a new feature. We only deliver bug fixes in order to keep the version as stable as possible so we will not add a hook in 1.7.8.6 .

However 8.0.0 should come in the summer so soon you should have all the hooks you need 👍

I close this issue as

  • for 8.x branch it's already OK (don't hesitate to check the new product page to see if you have all the hooks you want)
  • for 1.7.8.x we cannot add new features

@matks matks closed this as completed Apr 13, 2022
@prestashop-issue-bot prestashop-issue-bot bot removed the Needs Specs Status: issue needs to be specified label Apr 13, 2022
@matks matks added No change required Resolution: issue closed because expected as is and removed Waiting for dev Status: action required, waiting for tech feedback labels Apr 13, 2022
@hibatallahAouadni hibatallahAouadni added the Invalid Resolution: issue closed because invalid label Apr 15, 2022
@dnkhack
Copy link

dnkhack commented Oct 29, 2023

Hello @kratekk in 8.0 we'll have a full new product list page, and it has as far as I know all the hooks you would need 😄 .

But your focus in on 1.7.8.5 . Unfortunately on 1.7.8.x versions we only deliver bug fixes and adding a hook would be a new feature. We only deliver bug fixes in order to keep the version as stable as possible so we will not add a hook in 1.7.8.6 .

However 8.0.0 should come in the summer so soon you should have all the hooks you need 👍

I close this issue as

  • for 8.x branch it's already OK (don't hesitate to check the new product page to see if you have all the hooks you want)
  • for 1.7.8.x we cannot add new features

@matks Hello. This hook still doesn't work. in 8.1.1!

@rflorent
Copy link

rflorent commented Jan 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BO Category: Back Office Feature Type: New Feature Hook Invalid Resolution: issue closed because invalid Modules Component: Which BO section is concerned No change required Resolution: issue closed because expected as is Old Products Page Concerns the old product page
Projects
None yet
Development

No branches or pull requests

6 participants