I have a sales site where I use credits for "discounts."
What I want to do is if the product is 5.00 € and if the user has 100 credits
These 100 credits will discount X value at 5.00 €.
Example, Knowing that 10 credits deduct about 0.01 cents (this is an idea)
How do I get the code to check the credits and deduct the total amount?
Variables:
$cada10vale = 0.01;
$creditos_do_utilizador = $row['creditos'];
$preço_total_em_euros = $_SESSION['cart_total'];