Code Duplication    Length = 5-5 lines in 2 locations

ajax.php 1 location

@@ 55-59 (lines=5) @@
52
            }
53
            $vat_id = $product->getVar('product_vat_id');
54
55
            if ((int)$product->getVar('product_discount_price', '') != 0) {
56
                $productPrice = (float)$product->getVar('product_discount_price', 'e');
57
            } else {
58
                $productPrice = (float)$product->getVar('product_price', 'e');
59
            }
60
61
            parse_str(urldecode($_POST['formcontent']), $data);
62
            /*

class/oledrion_reductions.php 1 location

@@ 319-323 (lines=5) @@
316
            $this->addAssociatedCategories($product);
317
318
            // Calcul du total de la commande avant réductions
319
            if ((float)$product->getVar('product_discount_price', 'n') > 0) {
320
                $ht = (float)$product->getVar('product_discount_price', 'n');
321
            } else {
322
                $ht = (float)$product->getVar('product_price', 'n');
323
            }
324
            // S'il y a des options, on rajoute leur montant
325
            if (is_array($data['attributes']) && count($data['attributes']) > 0) {
326
                $ht += $this->handlers->h_oledrion_attributes->getProductOptionsPrice($data['attributes'], $product->getVar('product_vat_id'));