nspinheiro Posted February 22, 2014 Share Posted February 22, 2014 Hello I would like to create a custom field in the orders page (inside each individual order) It is just to include small comments from the sales team for further reference, basically text. I can only find tutorials for products, not for orders. Can i try to use the same concepts, changing off course the .tpl file edited and the db table? will it work without damaging the order process? Link to comment Share on other sites More sharing options...
vekia Posted February 22, 2014 Share Posted February 22, 2014 you will have to: - add new field to ps_order table to store this text for further reference - modify orders admin theme template file to display this field on order details page - modify order controller, where you have to define new field definition in object definition something like: http://www.prestashop.com/forums/topic/285258-solvedhow-to-add-new-text-field-to-a-product-which-will-only-be-available-from-the-bo/ but instead of products controller / template files use files related to orders 1 Link to comment Share on other sites More sharing options...
Edik Berber Posted November 12, 2014 Share Posted November 12, 2014 Hi, Do you happen to add a field to the order?If possible, please write how to implement! Link to comment Share on other sites More sharing options...
vekia Posted November 12, 2014 Share Posted November 12, 2014 what kind of field you want to add, what you're trying to achieve? Link to comment Share on other sites More sharing options...
pxloft Posted August 6, 2015 Share Posted August 6, 2015 what kind of field you want to add, what you're trying to achieve? Hello Vekia, I am trying to add a "Company" field on my orders tab in back office. This way I can see what orders are company from which company. Also is there a way to simply have a company page where you can see what money each company has spent? Thanks! Link to comment Share on other sites More sharing options...
mayank02 Posted December 7, 2015 Share Posted December 7, 2015 (edited) Hello Vekia sir, need ur help.., want to add a custom field "Asked Delivery date" in back office, while creating a new order for customer (in shipping section below Delivery Option). I want to add a datetime type input. Admin selects a date and created the order. It should also be visible in Orders list in back office would be great help if you could tell me in which file and where i have to change... Edited December 7, 2015 by mayank02 (see edit history) 1 Link to comment Share on other sites More sharing options...
sondiva Posted December 8, 2015 Share Posted December 8, 2015 Hello Vekia sir, need ur help.., want to add a custom field "Asked Delivery date" in back office, while creating a new order for customer (in shipping section below Delivery Option). I want to add a datetime type input. Admin selects a date and created the order. It should also be visible in Orders list in back office would be great help if you could tell me in which file and where i have to change... Seems we are on the same issue mayank, even I am looking for adding a date in shipping in back office admin manual order and bought a module from smadha but for some reason many vendors are unable to give a proper solution to add a date of delivery in shipping section in back office /Manual Order by admin. Vekia , Any guidance shall be appreciated... Link to comment Share on other sites More sharing options...
mayank02 Posted December 8, 2015 Share Posted December 8, 2015 Seems we are on the same issue mayank, even I am looking for adding a date in shipping in back office admin manual order and bought a module from smadha but for some reason many vendors are unable to give a proper solution to add a date of delivery in shipping section in back office /Manual Order by admin. Vekia , Any guidance shall be appreciated... looking for something like the screenshot. Link to comment Share on other sites More sharing options...
sondiva Posted December 8, 2015 Share Posted December 8, 2015 Asked Delivery Datepicker in AdminOrder.png looking for something like the screenshot. Yup, sure it is what i want...for front end i have bought the module but for backend admin order i need this to be incorporated. Link to comment Share on other sites More sharing options...
artigianidelweb Posted March 31, 2017 Share Posted March 31, 2017 you will have to: - add new field to ps_order table to store this text for further reference - modify orders admin theme template file to display this field on order details page - modify order controller, where you have to define new field definition in object definition something like: http://www.prestashop.com/forums/topic/285258-solvedhow-to-add-new-text-field-to-a-product-which-will-only-be-available-from-the-bo/ but instead of products controller / template files use files related to orders Hello, I tried with: 1) DATABASE ALTER TABLE `ps_orders` ADD `custom` VARCHAR(200) NOT NULL AFTER `date_upd` `; 2) override/classes/order/Order.php /** @var text note*/ public $custom; [...] 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'custom' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'), [...] 3) /BackofficeXYZ/themes/default/template/controllers/orders/helpers/view/view.tpl [...] <form class="form-horizontal hidden-print" method="post" action="{$currentIndex|escape:'html':'UTF-8'}&vieworder&token={$smarty.get.token}"> <div class="form-group"> <div class="col-lg-5"> <label class="control-label col-lg-3">Note</label> <input type="text" id="note" name="note" value="{$order->custom|default:''}"/> </div> <div class="col-lg-3"> <button class="btn btn-default" type="submit" name="submitCustom"><i class="icon-refresh"></i> {l s='Change'}</button> </div> </div> </form> [...] BUT it doens't works... how is the problem? Thank you so much! Link to comment Share on other sites More sharing options...
[email protected] Posted March 31, 2018 Share Posted March 31, 2018 Any update ? Any of give solution works.. Link to comment Share on other sites More sharing options...
jarvizx Posted April 4, 2018 Share Posted April 4, 2018 On 3/31/2017 at 8:46 AM, artigianidelweb said: Hello, I tried with: 1) DATABASE ALTER TABLE `ps_orders` ADD `custom` VARCHAR(200) NOT NULL AFTER `date_upd` `; 2) override/classes/order/Order.php /** @var text note*/ public $custom; [...] 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'custom' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'), [...] 3) /BackofficeXYZ/themes/default/template/controllers/orders/helpers/view/view.tpl [...] <form class="form-horizontal hidden-print" method="post" action="{$currentIndex|escape:'html':'UTF-8'}&vieworder&token={$smarty.get.token}"> <div class="form-group"> <div class="col-lg-5"> <label class="control-label col-lg-3">Note</label> <input type="text" id="note" name="note" value="{$order->custom|default:''}"/> </div> <div class="col-lg-3"> <button class="btn btn-default" type="submit" name="submitCustom"><i class="icon-refresh"></i> {l s='Change'}</button> </div> </div> </form> [...] BUT it doens't works... how is the problem? Thank you so much! Also you need add some lines in controllers/admin/AdminOrdersController.php something likes this. [function postProcess()] elseif (Tools::isSubmit('submitCustom') && isset($order)) { $order->custom = Tools::getValue('note'); $order->update(); Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&token='.$this->token); } 1 Link to comment Share on other sites More sharing options...
LaAmericana Posted April 1, 2019 Share Posted April 1, 2019 Hi, I need help, I would like to add a column in Catalog> Stocks, next to reference I would like to place EAN-13 Link to comment Share on other sites More sharing options...
gaur_ayush1421 Posted April 11, 2019 Share Posted April 11, 2019 (edited) Hello , need Help How to add field in these area . i already crate Carrier module . Edited April 11, 2019 by gaur_ayush1421 (see edit history) Link to comment Share on other sites More sharing options...
traktap Posted May 23, 2019 Share Posted May 23, 2019 On 4/11/2019 at 1:11 PM, gaur_ayush1421 said: Hello , need Help How to add field in these area . i already crate Carrier module . How did you manage, can you guide ? 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