instead of changing this in the code, you should do it in the discount portion of the eCart object
for the first rule, set the trigger to a custom condition:
$this->ConditionalTotal("Quantity", "PRODKATID", "7") - $this->ConditionalTotal("Quantity", "Primeur", "1") >= 96
then set the calculation to a flat rate and enter this code:
($this->ConditionalTotal("TotalPrice", "PRODKATID", "7") - $this->ConditionalTotal("TotalPrice", "Primeur", "1")) * 0.1
for the 3% off on 24 - 47, enter the following for the custom trigger:
($this->ConditionalTotal("Quantity", "PRODKATID", "7") - $this->ConditionalTotal("Quantity", "Primeur", "1") >= 24) && ($this->ConditionalTotal("Quantity", "PRODKATID", "7") - $this->ConditionalTotal("Quantity", "Primeur", "1") >= 47)
then set the calculation to a flat rate and enter this code:
($this->ConditionalTotal("TotalPrice", "PRODKATID", "7") - $this->ConditionalTotal("TotalPrice", "Primeur", "1")) * 0.03