well, it wasn't my code to begin with. i inherited this task from an employee that is no longer here. anyway...
Please understand, I wasn't attacking ... just commenting for your benefit. And I believe you should consider that there could be a reason why that employee isn't there anymore (possibly in part because of taking short-cuts that end up being real time-suckers down the road).
Think about cleaning that up and telling your client that you are doing so. They'll likely respect you for having some foresight and keeping an eye on their bottom line. Maybe not - but it's good business practice that is likely to pay off for you in the long run.
OK - on to the task at hand and doing a little guess-work here.
It LOOKS like your Q6, Q7, and Q8 are the quantities of different kinds of gift boxes. That's an assumption - we know what that can mean.
According to your statement above, it appears that the client wants the price of shipping for each gift box reduced by 6 euro.
Working from that info, here's what I would 'plug in' right before the last line where you total up shipping:
if (($GiftShipping > 1) AND ($BotQuantity > 1))
{
$totboxes = (Q6 + Q7 + Q8);
$discount = ($totboxes * 6);
$GiftShipping = ($GiftShipping - $discount);
}
This takes 6 eu off the shipping of Gift boxes for each box purchased.
One more thing - and I may be showing some ignorance here because I've led a very sheltered life - this code doesn't look like php as I know it. Perhaps Javascript?
Anyway, I gave you code in php since you posted this in the php code section. If you need to translate this to Javascript, someone with a broader background will need to help further.