Scripting Dilemma

Here’s the dilemma we would like to scrpt this so that there would be more than one discount

The discounts available are Spend £100.00 and get 10% off, spend £101.00 – £200.00 and get 15% off and spend £201.00 and receive 20% off

Anyone any idea what could be done….it’s from version 5.1 of clickcart pro

#########
######### This custom script calculates a sale
######### at checkout based on the contents of
######### the user’s shopping cart when they enter
######### checkout.
#########
######### A listing of available variables:
#########
######### $cart_quantity_found Total quantity of items
######### $tracking_subtotal Subtotal for all items
#########
######### This script sets X percent off on purchases of
######### Y amount or more.
#########

$sale_pct = “10”;
$total_needed = “50.00”;

if ($tracking_subtotal >= “$total_needed”) {

$sale_pct_calc = ($sale_pct / 100);

$tracking_saletotal = ($tracking_subtotal * $sale_pct_calc);
$tracking_saletotal = sprintf(“%.2f”, $tracking_saletotal);

$tracking_saledesc = “Spend $currency_symbol$total_needed Or More – Save $sale_pct\%”;

} ######### End of if statement.

Leave a Reply

Your email address will not be published. Required fields are marked *