Prestashop: There is no hook(s) on the Product form Page to alter the form the right way

Created on 12 May 2020  路  7Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

self described

Expected behavior

We want to be able to alter the form using the form builder directly and not having to override the services

Additional information

  • PrestaShop version: 1.7+
  • PHP version: N/A
// ProductController on line 703
        $this->get('prestashop.core.hook.dispatcher')->dispatchWithParameters('actionProductFormBuilderModifier', [
            'form_builder' => $formBuilder,
            'id' => $product->id,
        ]);
1.7.x BO Products waiting for dev

Most helpful comment

I'm aware of your roadmap: migration of Product page was planned in 1.7.4, 1.7.5, 1.7.6, 1.7.7 and now 1.7.8...

This is mean. Please remember we follow a Code of Conduct here in order for everybody to feel at ease and able to work together in the very best environment. It seems you are trying to convince me to do something (merge the PR to insert this hook) but being mean will actually do the opposite: I will ignore you, following this piece of advice from Twitter.

All 7 comments

Thanks for opening this issue! We will help you to keep its state consistent

Hi @mickaelandrieu ,
Thanks for the request !
I'll let the dev team know about this !

Hi @PrestaShop/prestashop-core-developers ,

@mickaelandrieu has a request regarding the Product form Page. Is that something that can be implemented ?

Thanks!

Product page rework is scheduled for 1.7.8 and is expected to be done following other similar Add/Edit page structure 馃槈so the standard form builder and data handler hooks will be usable.

https://devdocs.prestashop.com/1.7/modules/sample-modules/grid-and-identifiable-object-form-hooks-usage/

Hi @matks,

I'm aware of your roadmap: migration of Product page was planned in 1.7.4, 1.7.5, 1.7.6, 1.7.7 and now 1.7.8...

In the meantime, what is the cost of providing the Hook I suggest ? :) Once the page is migrated it can be aliased to the new ones as it provides a form builder.

Also, 1.7.7 release was 1 year of work: it sounds arsh (to me) to ask people to wait for one more year to be allowed to customize easily the Product Page (almost 90% of the BO customisations).

WDYT ?

EDIT: We may also name it after their futures names (you only need to check for HTTP method GET/POST in order to dispatch actionBeforeCreateProductFormHandler or actionAfterCreateProductFormHandler , so no BC breaks at all.

I'm aware of your roadmap: migration of Product page was planned in 1.7.4, 1.7.5, 1.7.6, 1.7.7 and now 1.7.8...

This is mean. Please remember we follow a Code of Conduct here in order for everybody to feel at ease and able to work together in the very best environment. It seems you are trying to convince me to do something (merge the PR to insert this hook) but being mean will actually do the opposite: I will ignore you, following this piece of advice from Twitter.

This is not.

I wont contribute anymore, enjoy your day. Keep hiding behind your nice articles instead of trying to address problems of this software: this is a really good way to empower people around you, mate.

++

Was this page helpful?
0 / 5 - 0 ratings