/** * Supprime une commande et tout ce qui s'y rattache * * @param oledrion_commands $order * @return boolean */ public function removeOrder(oledrion_commands $order) { $handlers = oledrion_handler::getInstance(); $cmd_id = $order->getVar('cmd_id'); $res = $this->delete($order); // Suppression des objets associés // 1) Ses propres caddies $handlers->h_oledrion_caddy->removeCartsFromOrderId($cmd_id); // 2) Les caddies des attributs $handlers->h_oledrion_caddy_attributes->removeCartsFromOrderId($cmd_id); return $res; }