Prestashop: displayAdminOrderTabLink & displayAdminOrderTabContent not working

Created on 25 Jun 2020  路  8Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

displayAdminOrderTabLink and displayAdminOrderTabContent dont working correctly on 1.7.7.0 beta.
After applying the fixe found in #19216 a tab is showed in the order detail page, but no content is inside it.
if you place a var_dump or returns a fixed text from the module hook the content isn't displayed. Also, if you stop the execution using a die; it won't stop, just keep the white block

Expected behavior

Using hooks displayAdminOrderTabContent & displayAdminOrderTabLink should return some text or html from the module's hook into the order detail page (backoffice)

Steps to Reproduce

1 - Install any 1.7.6 module that prints an extra tab in the order detail page (backoffice) using displayAdminOrderTabLink & displayAdminOrderTabContent
2 - Apply the fix found on issue #19216
3 - The card show's but empty, no content, looks like the hook isn't really executed.

Screenshots

Code used to test if the hook is executing or doing something.
https://imgur.com/a/BcRngX3

Result (always the same, using the var_dump, using an echo, returning text...etc)
https://imgur.com/a/hmCWdLG

Additional information

  • PrestaShop version: 1.7.7.0 beta
  • PHP version: 7.3.x under Ubuntu 16.04
1.7.7.0 BO No change required

All 8 comments

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

Hi @lithiumbj ,
The fix you mentioned is about the Product Page, not the Order Page.
What exactly do you want to do ? Could you send me a screenshot fo the issue ?
Thanks!

Hi @lithiumbj ,
The fix you mentioned is about the Product Page, not the Order Page.
What exactly do you want to do ? Could you send me a screenshot fo the issue ?
Thanks!

The fix was done for Product page but it impacted the whole shop 馃槃 in fact the bug was everywhere

@lithiumbj Warning: the fix concerns 1.7.7, where the order page has been reworked 馃 .

In your issue you speak about a bug on 1.7.6 but also speak about 1.7.7 . I'm confused 馃槃

The Order page of 176 and the Order page of 177 are completely different (see https://build.prestashop.com/news/the-new-order-pages-in-prestaShop-1-7-7/) so can you explain which version exactly you use ? It's important 馃槃

@lithiumbj Warning: the fix concerns 1.7.7, where the order page has been reworked thinking .

In your issue you speak about a bug on 1.7.6 but also speak about 1.7.7 . I'm confused smile

The Order page of 176 and the Order page of 177 are completely different (see https://build.prestashop.com/news/the-new-order-pages-in-prestaShop-1-7-7/) so can you explain which version exactly you use ? It's important smile

Sorry (my english level hehe) The bug is in 1.7.7.0 (with the full-new order page) we are adapting our 1.7.6.5 current module to the new beta version to have it available before the new version is releases to keep our customers within service.

So, using the new hooks on the 1.7.7.0 in the new order detail page is the problem.

If you need any more info, please tell me.

Hi @lithiumbj ,
The fix you mentioned is about the Product Page, not the Order Page.
What exactly do you want to do ? Could you send me a screenshot fo the issue ?
Thanks!

Yes i want to use the new displayAdminOrderTabContent & displayAdminOrderTabLink hooks, but when i use it from my module they dont print anything, i think there are not executing (won't display nothing even using a var_dump and a die)

Nevermind, was my fault, the hooks wasn't registered correctly, so sorry, closing this thread.

Nevermind, was my fault, the hooks wasn't registered correctly, so sorry, closing this thread.

No worries, thank you for testing the beta 馃槈 we are open to more feedback if you have some (for example: do you like the new Order page ?)

What do you mean by "the hooks wasn't registered correctly" ? Do you mean you did not type them well ?

Because this is something that happens often 馃槃 for example people write "addAdminproduct" instead of "addAdminProducts" (missing the s) and it does not work ... maybe this could be improved by throwing an error message "hey ! you have registered to a hook that looks like it does not exist ... are you sure this is what you want to do ?"

Was this page helpful?
0 / 5 - 0 ratings