So the system works like this. If the user buy more than 500usd they will get free shipping fee, else they will be charged 10usd for order that is less than 500usd.
So my problem here is there are two options for the user to choose to receive their item. One is “self pick up” the other one is “delivery “
How do I make my system to change the way of calculating the total amount according to the drop down values. Because if the user choose “self pick” up the delivery fee should be set to 0 usd automatically.
I did the calculations with php for now. So when the order is less than 500usd it will automatically add 10usd to the total price. Below is the php code for the calculations.
while ($row = $query->fetch_assoc()) {
$seller_id = $row['seller_id'];
$product_id = $row['product_id'];
$quantity = $row['cart_qty'];
$quantity_unit = $row['cart_unit'];
$purchase_price = $row['cart_price'] * $quantity;
if($purchase_price < 500.00){
$grand_total += ($row['cart_price'] * $row['cart_qty'])+10.00;
}else{
$grand_total += $row['cart_price'] * $row['cart_qty'];
}
$order_status = 1;
$datetime = date('Y-m-d H:i:s');
How can I use jQuery select box change method do the calculations according to my problem that I explained above??