if ($product === false) {
     $error_product = true;
     $product_id = 0;
     $article_id = 0;
     $ean_no = '';
 } else {
     $product_id = $product->id;
     if (is_null($plength) || is_numeric($plength) && $plength == 0) {
         $article_id = 0;
     } else {
         //if product with size, translate first to length
         if (Product::isUsingSizeInsteadOfLength($product->category_id)) {
             $plength = translateSize2Length($plength);
         } else {
             //if ring then change length from sku to cm
             if (Product::isUsingLengthInMilimeter($product->category_id)) {
                 //some ring products were uploaded with
                 //additional length added separated with "-"
                 if (!is_numeric($plength)) {
                     list($length_int, $length_ext) = explode('-', $plength);
                     $plength = $length_int;
                 }
                 $plength = $plength / 10;
             }
         }
         $article_id = $product->getArticleIDFromLength($plength);
     }
     $ean_no = $product->getEAN($article_id);
 }
 $o_detail = Order::getOldOrderFunctionSP()->retrieveDetail('', $order_number);
 if (count($o_detail) > 0) {