2
I have a sales website where I use credits for "discounts".
What I want to do is if the product is 5.00€ and the user has 100 credits
These 100 credits will discount X value at 5.00€.
Example, Knowing that 10 credits discount about 0.01 cents (this is an idea)
How do I have the code 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'];
...
$preco_total_com_desconto = $preço_total_em_euros - (abs($creditos_do_utilizador / 10) * $cada10vale)
, no? Or lost something in the problem description?– nunks
Will deduct from the total value or from a specific product?
– Guilherme Nascimento
total value account only
– Silva
$Otal = $price_total_em_euros - (abs($creditos_do_username / 1000));
– user60252
Dude, don’t use special characters on the variables, take this price cedilla because it will give dick early pu late.
– Diéfani Favareto Piovezan