fortuner Posted March 28, 2016 Share Posted March 28, 2016 Hello everyone:) I'm making a small override to display a customer phone (and other datas) in Backoffice Order List. Everything works fine, but I want to add a link to customer phone like that <a href="tel:+1234567890">+1234567890</a> Here is the override code: <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'address` addr ON (a.`id_address_delivery` = addr.`id_address`)'; // //$this->_select .= ', CONCAT(\'<a href = "tel:\', addr.phone_mobile, \'>\', addr.phone_mobile, \'</a>\') AS phone'; // I've tryed CONCAT but it returns text instead of link $this->_select .= ', addr.phone_mobile AS phone'; // Select mobile phone // Phones column $this->fields_list['phone'] = array( 'title' => $this->l('Phone'), 'align' => 'text-center', 'class' => 'width-50', 'prefix' => '<a href="tel:">', 'suffix' => '</a>' //'callback' => 'orderPhone' ); } Place it in the override/controllers/admin/AdminOrderController.php As you can see, I've already tried CONCAT, but it returns plain text instead of link. I also tried 'prefix' and 'suffix' but link href remains empty. How do I add this link properly? Thanks in advance! 1 Link to comment Share on other sites More sharing options...
fortuner Posted March 28, 2016 Author Share Posted March 28, 2016 The idea is to make link on phone number, so when it ts clicked the dialing software grabs the number and makes a phone call. Or, in example, number is copied to dialer, if you use a smartphone. Link to comment Share on other sites More sharing options...
fortuner Posted March 29, 2016 Author Share Posted March 29, 2016 Some ideas? Maybe it's possible to make with a callback to the function? Or I should make another override for HelperList class and add a link type field? I'm confused. Link to comment Share on other sites More sharing options...
Ali Samie Posted April 25 Share Posted April 25 I like how you left Prestashop community, it's a better decision for everyone, because after 8 years there is no single user that can answer simple questions about this damn framework. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now