Displaying the customer's choice in the back office

You've reached the last part of this chapter (don't worry, it's the easiest part).

In the install method of your module, attach your module to the displayAdminOrder hook (do not forget to uninstall/reinstall your module once done).

Next, as for the other hooks, create a controller named displayAdminOrder. In this controller, first check whether the carrier selected is the one with the relay point. Then, retrieve the choice of the customer with the cart ID by using the method we created in the previous section, getRelayPointByCartId.

Finally, assign the object to Smarty. At the end, you should have something like this:

public function run() { // Check if selected carrier is relay point carrier $order ...

Get PrestaShop Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.