Total newbie to php with problem. Here is function that calulate if value is between ex. 0,00 and 1.500,00 then discount number is 8
function wpsc_cart_discount_number(){
global $wpsc_cart;
if ($total >= 0000 && $total < 1500) {
return $discount->wpsc_cart_discount_number = '8';
} if ($total >= 1500 && $total < 3000) {
return $discount->wpsc_cart_discount_number = '11';
} if ($total >= 3000 && $total < 7000) {
return $discount->wpsc_cart_discount_number = '13';
} if ($total >= 7000 && $total < 10000) {
return $discount->wpsc_cart_discount_number = '16';
} if ($total >= 10000) {
return $discount->wpsc_cart_discount_number = '18';
}
}
When i call this function it keep returning only value of "8" and not other what is wrong here?
Please help
Thanks