close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Combined Shipping Discounts:

Thread began 2/05/2010 11:36 am by BeDigital94844 | Last modified 5/27/2010 5:31 pm by BeDigital94844 | 4680 views | 27 replies

BeDigital94844Beta Tester

Combined Shipping Discounts

Eric-

Thanks for your support - still having a difficult time getting the shipping over> $100 to be applied to only US ship to countries: everything eles seems to work- all ship to countries with order greater than $100 receive free shipping- which is incorrect but is likely due to the individual shipping rules Total Price <100

I am using the $_SESSION["eCartCheckoutForm_shipping_country"] on the confirm page


here is the shipping rules - there are 4 types of shipping Fedex standard, next day, 2 day, and international - I think those rules may conflict with the free domestic over 100 rule

//start node
function DefineRules() {
$this->Discounts = array();
$this->Charges = array();
$this->Tax = array();
$this->Shipping = array();
$this->ShippingIsTaxed = true;
//Discounts
$this->Discounts[] = new WA_eCart_Rule(urldecode("Free_Shipping_Override"), true, "WAEC_eCart1_Free_Shipping_Override");
$this->Discounts[] = new WA_eCart_Rule(urldecode("Promo%2015%25%20%20Discount"), true, "WAEC_eCart1_15PromoDiscount");
$this->Discounts[] = new WA_eCart_Rule(urldecode("Promo%2020%25%20Discount"), true, "WAEC_eCart1_Pomotional20Discount");
$this->Discounts[] = new WA_eCart_Rule(urldecode("Promo%2025%25%20Discount"), true, "WAEC_eCart1_Promo25Discount");
//Charges
//Tax
$this->Tax[] = new WA_eCart_Rule(urldecode("NJS%20Sales%20Tax"), true, "WAEC_eCart1_NJSalesTax");
$this->Tax[] = new WA_eCart_Rule(urldecode("NYS%20Sales%20Tax"), true, "WAEC_eCart1_NYSSalesTax");
//Shipping
$this->Shipping[] = new WA_eCart_Rule(urldecode("Shipping%20&%20Handling"), false, "WAEC_eCart1_ShippingHandling");
$this->Shipping[] = new WA_eCart_Rule(urldecode("Fedex%20Standard"), true, "WAEC_eCart1_FedexStandard");
$this->Shipping[] = new WA_eCart_Rule(urldecode("Fedex%20Next%20Day"), true, "WAEC_eCart1_FedexNextDay");
$this->Shipping[] = new WA_eCart_Rule(urldecode("Fedex%202%20Day"), true, "WAEC_eCart1_Fedex2Day");
$this->Shipping[] = new WA_eCart_Rule(urldecode("Fedex%20International"), true, "WAEC_eCart1_FedexInternational");
$this->Shipping[] = new WA_eCart_Rule(urldecode("FreeDomesticShippingOver100"), true, "WAEC_eCart1_FreeDomesticShippingOver100");
}
//end node
//start node
//eCart Rule
function WAEC_eCart1_Free_Shipping_Override() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['PromoCode'])?$_SESSION['PromoCode']:"") == "SHIP4FREE"))) {
$totalDiscount += 0.00;//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_15PromoDiscount() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['PromoCode'])?$_SESSION['PromoCode']:"") == "L7ViYvea"))) {
$totalDiscount += ($this->TotalColumn("TotalPrice") * 0.15);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_Pomotional20Discount() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['PromoCode'])?$_SESSION['PromoCode']:"") == "KVGVIP"))) {
$totalDiscount += ($this->TotalColumn("TotalPrice") * 0.20);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_Promo25Discount() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['PromoCode'])?$_SESSION['PromoCode']:"") == "CLBuvb6i"))) {
$totalDiscount += ($this->TotalColumn("TotalPrice") * 0.25);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_NJSalesTax() {
$totalTax = 0;
if (true && (($this->GetTaxableTotal() > 0) && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "New Jersey") || ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "NJ"))) {
$totalTax += ($this->GetTaxableTotal() * 0.070);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_NYSSalesTax() {
$totalTax = 0;
if (true && (($this->GetTaxableTotal() > 0) && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "New York") || ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "NY"))) {
$totalTax += ($this->GetTaxableTotal() * 0.08775);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_ShippingHandling() {
$totalShipping = 0;
if (false && ((sizeof($this->Items) > 0))) {
$totalShipping += 10;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_FedexStandard() {
$totalShipping = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['eCartCheckoutForm_shipping_type'])?$_SESSION['eCartCheckoutForm_shipping_type']:"") == "1") && ($this->TotalColumn("TotalPrice") < 100))) {
$totalShipping += 9.95;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_FedexNextDay() {
$totalShipping = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['eCartCheckoutForm_shipping_type'])?$_SESSION['eCartCheckoutForm_shipping_type']:"") == "2") && ($this->TotalColumn("TotalPrice") < 100))) {
$totalShipping += 21.95;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_Fedex2Day() {
$totalShipping = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['eCartCheckoutForm_shipping_type'])?$_SESSION['eCartCheckoutForm_shipping_type']:"") == "3") && ($this->TotalColumn("TotalPrice") < 100))) {
$totalShipping += 14.95;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_FedexInternational() {
$totalShipping = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['eCartCheckoutForm_shipping_type'])?$_SESSION['eCartCheckoutForm_shipping_type']:"") == "4") && ($this->TotalColumn("TotalPrice") < 100))) {
$totalShipping += 28.50;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_eCart1_FreeDomesticShippingOver100() {
$totalShipping = 0;
if (true && ((sizeof($this->Items) == 0) && ($this->TotalColumn("TotalPrice") > 100) && ((isset($_SESSION['eCartCheckoutForm_shipping_country'])?$_SESSION['eCartCheckoutForm_shipping_country']:"") == "US"))) {
$totalShipping += 0.00;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...