fitgura Posted May 5, 2011 Share Posted May 5, 2011 Hi All!I updated to PS1-4-1-0 from 1.3.1.1 and I lost the tracking (Shipping) number fieldI checked the admin/tabs/adminorders.php file but I did not see any difference!Please let me know what could be the problem, why I cannot see and set the tracking number field, after I set the status to shippedthere is the code samples.. /* Update shipping number */ if (Tools::isSubmit('submitShippingNumber') AND ($id_order = (int)(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((int)($order->id_customer)); $carrier = new Carrier((int)($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}' => (int)($order->id) ); @Mail::Send((int)($order->id_lang), 'in_transit', Mail::l('Package in transit'), $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname); } } else $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); } /* Display shipping number field */ if ($carrier->url && $order->hasBeenShipped()) echo ' <form action="'.$currentIndex.'&view;'.$this->table.'&token;='.$this->token.'" method="post" style="margin-top:10px;"> <input type="text" name="shipping_number" value="'. $order->shipping_number.'" /> <input type="hidden" name="id_order" value="'.$order->id.'" /> <input type="submit" name="submitShippingNumber" value="'.$this->l('Set shipping number').'" class="button" /> </form>'; echo ' '; Link to comment Share on other sites More sharing options...
fitgura Posted May 5, 2011 Author Share Posted May 5, 2011 is there any solution? Link to comment Share on other sites More sharing options...
JohannSebastian Posted September 2, 2011 Share Posted September 2, 2011 Regardless of whether fitgura has solved his problem or not I would like to inform my friends that the shipping number field appears only when the carrier has the url address set in his Back Office tab. Link to comment Share on other sites More sharing options...
JohannSebastian Posted September 2, 2011 Share Posted September 2, 2011 Sorry ... and the order must be shipped (shipped state). 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