Code Duplication    Length = 3-3 lines in 2 locations

class/oledrion_reductions.php 2 locations

@@ 325-327 (lines=3) @@
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'));
327
            }
328
329
            $this->totalAmountBeforeDiscounts += ($data['qty'] * $ht);
330
@@ 440-442 (lines=3) @@
437
            }
438
            // S'il y a des options, on rajoute leur montant
439
            $productAttributes = array();
440
            if (is_array($cartProduct['attributes']) && count($cartProduct['attributes']) > 0) {
441
                $ht += $this->handlers->h_oledrion_attributes->getProductOptionsPrice($cartProduct['attributes'], $cartProduct['product']->getVar('product_vat_id'), $productAttributes);
442
            }
443
444
            $discountedPrice = $ht;
445
            $quantity        = (int)$cartProduct['qty'];