ventesites Posted August 19, 2015 Share Posted August 19, 2015 bonjour le numero de suivi Colissimo que j'entre sur le site contient des espaces ce qui fait que l'url de suivi envoi bien sur la page Colissimo mais sans numero donc le suivi n'apparait pas Il faudrait que je puisse enlever les espaces de $shipping_number mais je ne situe pas bien sur quel fichier le faire ni comment le coder correctement style str_replace (" ","",$shipping_number); est-ce dans /classes/order/order.php ou /controllers/admin/adminOrdersController.php ? je suis sur PS1.6.9 merci ! Link to comment Share on other sites More sharing options...
Elitius Posted August 20, 2015 Share Posted August 20, 2015 (edited) Bonjour, Dans AdminOrdersController.php ligne 460: if (Tools::isSubmit('submitShippingNumber') && isset($order)) { if ($this->tabAccess['edit'] === '1') { $order_carrier = new OrderCarrier(Tools::getValue('id_order_carrier')); if (!Validate::isLoadedObject($order_carrier)) { $this->errors[] = Tools::displayError('The order carrier ID is invalid.'); } elseif (!Validate::isTrackingNumber(str_replace(" ", "", Tools::getValue('tracking_number')))) { $this->errors[] = Tools::displayError('The tracking number is incorrect.'); } else { // update shipping number // Keep these two following lines for backward compatibility, remove on 1.6 version $order->shipping_number = str_replace(" ", "", Tools::getValue('tracking_number')); $order->update(); Edited August 20, 2015 by Elitius (see edit history) Link to comment Share on other sites More sharing options...
ventesites Posted August 20, 2015 Author Share Posted August 20, 2015 merci, je vais essayer, j'avais fini par modifier la classe order.php ce qui apparemment fonctionne aussi est-ce que c'est mieux de modifier le controller? Link to comment Share on other sites More sharing options...
Elitius Posted August 20, 2015 Share Posted August 20, 2015 Bonjour, Le mieux est effectivement de faire un override de votre controlleur. 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