close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Please help with eCart international shipping

Thread began 11/23/2011 2:31 pm by tharlow70972 | Last modified 11/29/2011 2:15 pm by Jason Byrnes | 2651 views | 3 replies |

tharlow70972

Please help with eCart international shipping

I'm trying to have two shipping rules based on Country. If shipping to the US then a flat fee of $5. If shipping to Canada a flat fee of $12

This is my attempt in the shipping rules. Don't know what I'm doing wrong because shipping is not displaying on shopping cart page.

<%
function WAEC_xxCart_shipgeneral()
totalShipping = 0
if (true AND ((WA_eCart_TotalColumn(xxCart, "TotalPrice") > 0) AND (cStr(Session("eCartCheckoutForm_shipping_country")) = "US"))) then
totalShipping = totalShipping + 5.00'Result
end if
WAEC_xxCart_shipgeneral = WA_eCart_FormatNumber(totalShipping, xxCart.ForceDecimalsC, xxCart.DecimalPlacesC)
end function
%>
<%
function WAEC_xxCart_shipcan()
totalShipping = 0
if (true AND ((WA_eCart_TotalColumn(xxCart, "TotalPrice") > 0) AND (cStr(Session("eCartCheckoutForm_shipping_country")) = "CA"))) then
totalShipping = totalShipping + 12.00'Result
end if
WAEC_xxCart_shipcan = WA_eCart_FormatNumber(totalShipping, xxCart.ForceDecimalsC, xxCart.DecimalPlacesC)
end function
%>

Sign in to reply to this post

Dani Chankhour

Can you confirm that the session is being set correctly.

Try outputting the country session inside the shipping function to see if the session is set already.

Sign in to reply to this post

tharlow70972

Not sure what you mean.

The code above is produced by the eCart shipping rules interface. It looks to me like it is called inside the shipping function:

<%
function xxCart_DefineRules()
xxCart.Discounts = Array()
xxCart.Charges = Array()
xxCart.Tax = Array()
xxCart.Shipping = Array()
xxCart.ShippingIsTaxed = true
'Discounts
xxCart.Discounts = WA_eCart_AddRule(xxCart.Discounts, Unescape("Wholesale%20Discount"), true, "WAEC_xxCart_WholesaleDiscount")
'Charges
'Tax
xxCart.Tax = WA_eCart_AddRule(xxCart.Tax, Unescape("Sales%20Tax"), true, "WAEC_xxCart_SalesTax")
'Shipping
xxCart.Shipping = WA_eCart_AddRule(xxCart.Shipping, Unescape("shipgeneral"), true, "WAEC_xxCart_shipgeneral")
xxCart.Shipping = WA_eCart_AddRule(xxCart.Shipping, Unescape("shipcan"), true, "WAEC_xxCart_shipcan")
end function
%>

Sorry if I'm not understanding what you are asking

Sign in to reply to this post

Jason ByrnesWebAssist

the rule relies on a session variable being set and it's value.

the sugestion is to output the session on page:

eCartCheckoutForm_shipping_country: <%= Session("eCartCheckoutForm_shipping_country" ) %>




to check that the session is set and has the correct value. add that code to the confirm page after the <body> tag and post a link to your site please.

Sign in to reply to this post

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...