Displaying the relay pickup points list during the checkout
As our module's aim is to make it possible for customers to choose a relay pickup point, we will use the displayAfterCarrier
hook to create a modal DIV
containing our relay points list on the checkout page, ready to show or hide whether our Carrier has been chosen or not.
The hookDisplayAfterCarrier($params)
method uses this code:
public function hookDisplayAfterCarrier($params) { $this->smarty->assign([ 'relays'=>$this->relays, ]); $relayCart = $this->findCheckoutRelayFromCart(); if(!is_null($relayCart)){ $this->smarty->assign([ 'id_relay_checked' => $relayCart->getRelay(), ]); } return $this->fetch( 'module:whrelaycarrier/views/templates/hook ...