Jimena Posted June 20, 2019 Share Posted June 20, 2019 Hi, I've added a new field to the PS_ORDER_CARRIER table: "tracking_url" What i want to do is show the tracking url value in the customer order detail (order_detail.tpl) but i don't know how to load the new data into $order.shipping {foreach from=$order.shipping item=line} <tr> <td>{$line.shipping_date}</td> <td>{$line.carrier_name}</td> <td>{$line.shipping_weight}</td> <td>{$line.shipping_cost}</td> <td>{$line.tracking}</td> <td>{$line.tracking_url}</td> </tr> {/foreach} I've put the class with the new field in override/classes/order/orderCarrier.php /** @var string */ public $tracking_url; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'order_carrier', 'primary' => 'id_order_carrier', 'fields' => array( ............. 'tracking_url' => array('type' => self::TYPE_STRING), ) , ); I'm missing a step for adding the data to the table, right? Thank you so much. Link to comment Share on other sites More sharing options...
Jimena Posted June 20, 2019 Author Share Posted June 20, 2019 I found it: i have to edit getShipping() method i guess. 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