anmgra Posted July 26, 2010 Share Posted July 26, 2010 I guess i need to edit this field in adminfolder/tabs/AdminOrders.php, start line 63 /* Update shipping number */ if (Tools::isSubmit('submitShippingNumber') AND ($id_order = intval(Tools::getValue('id_order'))) AND Validate::isLoadedObject($order = new Order($id_order))) { if ($this->tabAccess['edit'] === '1') { if (!$order->hasBeenShipped()) die(Tools::displayError('The shipping number can only be set once the order has been shipped!')); $_GET['view'.$this->table] = true; $shipping_number = pSQL(Tools::getValue('shipping_number')); $order->shipping_number = $shipping_number; $order->update(); if ($shipping_number) { global $_LANGMAIL; $customer = new Customer(intval($order->id_customer)); $carrier = new Carrier(intval($order->id_carrier)); if (!Validate::isLoadedObject($customer) OR !Validate::isLoadedObject($carrier)) die(Tools::displayError()); $templateVars = array( '{followup}' => str_replace('@', $order->shipping_number, $carrier->url), '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{id_order}' => intval($order->id) ); $subject = 'Package in transit'; Mail::Send(intval($order->id_lang), 'in_transit', ((is_array($_LANGMAIL) AND key_exists($subject, $_LANGMAIL)) ? $_LANGMAIL[$subject] : $subject), $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname); } } else $this->_errors[] = Tools::displayError('You do not have permission to edit anything here.'); } I want to be able to add the trackingnumber when the status is in "Preparation" so I can include the tracking no. in the shipped mail to my customer. Any ideas? Did find a post for earlier version of Prestashop that I coulnd not fit. Link to comment Share on other sites More sharing options...
robkwal Posted July 26, 2010 Share Posted July 26, 2010 This also interests me... Link to comment Share on other sites More sharing options...
msk69 Posted November 16, 2010 Share Posted November 16, 2010 i had it in an old version.. but i gues you have to look at AdminOrders.php in admin/tabs/Line 580 /* Display shipping number field */ if ($carrier->url && $order->hasBeenShipped()) Link to comment Share on other sites More sharing options...
youstar Posted December 17, 2010 Share Posted December 17, 2010 I would love this module aswell Link to comment Share on other sites More sharing options...
hiddenjo Posted January 17, 2011 Share Posted January 17, 2011 You'll have to update AdminOrders.php.To show the Tracking number field at any stage, comment off this line:// if ($carrier->url && $order->hasBeenShipped())To allow the Tracking number field to be updated at any stage, comment off this line: // if (!$order->hasBeenShipped()) // die(Tools::displayError('The shipping number can only be set once the order has been shipped!'));Hope this helps. 1 Link to comment Share on other sites More sharing options...
FotisM Posted February 14, 2011 Share Posted February 14, 2011 I want to be able to add the trackingnumber when the status is in "Preparation" so I can include the tracking no. in the shipped mail to my customer. Any ideas? Did find a post for earlier version of Prestashop that I coulnd not fit. I think that the easiest way to do this, is the following:Go to the "Order statuses" at the "Orders" tab of the Back Office. Edit the "Order shipped" status and disable the "Send e-mail to customer when order is changed to this status" option. By doing this, no mail will be sent but tracking number box will appear when you change an order's status to "Shipped". Then, you can add the track number and click on "Set shipping number" and you will send only one (instead of two) e-mails.You should edit the "in_transit.html" (or "in_transit.txt") mail template, so that it looks more like the "shipped.html" template that is sent when an order is set to "Shipped" status. 1 Link to comment Share on other sites More sharing options...
ModSystems Posted November 8, 2011 Share Posted November 8, 2011 I think that the easiest way to do this, is the following: Go to the "Order statuses" at the "Orders" tab of the Back Office. Edit the "Order shipped" status and disable the "Send e-mail to customer when order is changed to this status" option. By doing this, no mail will be sent but tracking number box will appear when you change an order's status to "Shipped". Then, you can add the track number and click on "Set shipping number" and you will send only one (instead of two) e-mails. You should edit the "in_transit.html" (or "in_transit.txt") mail template, so that it looks more like the "shipped.html" template that is sent when an order is set to "Shipped" status. I tried it, but I still see no track number box. Help me please Using prestashop 1.4.4.1 Link to comment Share on other sites More sharing options...
msk69 Posted November 8, 2011 Share Posted November 8, 2011 I tried it, but I still see no track number box. Help me please Using prestashop 1.4.4.1 Do you have the tracking url active? Link to comment Share on other sites More sharing options...
ModSystems Posted November 8, 2011 Share Posted November 8, 2011 doubt it, where do I fix this? Link to comment Share on other sites More sharing options...
msk69 Posted November 8, 2011 Share Posted November 8, 2011 admin > Shipping > Carriers Edit a carrier, and add the tracking url. Replace the trackingnumber with @ Link to comment Share on other sites More sharing options...
ModSystems Posted November 8, 2011 Share Posted November 8, 2011 done, still same Link to comment Share on other sites More sharing options...
msk69 Posted November 8, 2011 Share Posted November 8, 2011 which solution did you use in this post? i use http://www.prestashop.com/forums/topic/63987-add-tracking-number-before-status-shipped/page__view__findpost__p__471481 and works fine. Link to comment Share on other sites More sharing options...
ModSystems Posted November 8, 2011 Share Posted November 8, 2011 omg im so retarded... appearently I didnt upload the editted php file.. Thanks Link to comment Share on other sites More sharing options...
msk69 Posted November 8, 2011 Share Posted November 8, 2011 LOL Link to comment Share on other sites More sharing options...
phantomeye Posted November 9, 2011 Share Posted November 9, 2011 Hey Guys, Can the shipping numbers be entered directly into the database? If so, which table. Thanks Found it : - It is in a table called 'orders' in a field called shipping. - I updated my carriers from the admin to include tracking numbers - It created a new carrier with the tracking enabled - Went to table called 'orders' and sql statement set all 'carrier' to the new carrier id - Then sql statement updated all required order_id with shipping numbers - Works for all orders (before and after enabling tracking) Bada Bing !! it worked Now i gotta figure how to trigger sending the email, after i set the above and order status via the database Link to comment Share on other sites More sharing options...
Lucas-911 Posted February 10, 2012 Share Posted February 10, 2012 Can someone send me an example of the tracking URL code please? Link to comment Share on other sites More sharing options...
kek83 Posted September 29, 2015 Share Posted September 29, 2015 (edited) Hi, my version of presta is 1.6.0.14 I have to update manually my orders. I did that and it works like a charm : require_once('../config/config.inc.php');$id_order=8;$order = new Order($id_order);$order->setCurrentState(4); Now i would like to update the tracking number. Wath is the best way to do that ? I think i've to update the two tables : ps_order_carrier qnd ps_orders. Is there anything else to do to considere the order as "shipped" ? I've seen a field "is shipped" but i don't remenber where. Thanks for your help ! Mathieu Edited September 29, 2015 by kek83 (see edit history) Link to comment Share on other sites More sharing options...
softhightech Posted March 22, 2017 Share Posted March 22, 2017 'update `'._DB_PREFIX_.'order_carrier` set tracking_number = \''.$url_trace.'\' where id_order = '.$id_order; this is works for me : 'update `'._DB_PREFIX_.'order_carrier` set tracking_number = \''.$url_trace.'\' where id_order = '.$id_order; 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