close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Charging Different Base Shipping in eCart5 (i.e., one for U.S., one for Canada, one for Rest of World)

Thread began 9/30/2013 4:13 pm by Sara | Last modified 10/01/2013 11:59 am by Sara | 2498 views | 10 replies |

Sara

Charging Different Base Shipping in eCart5 (i.e., one for U.S., one for Canada, one for Rest of World)

I'm a law professor, not a programmer, so I see references that glance at this topic but none is as explicit as I need it to be.

In what file and at what line number should I insert what .php language that would enable me to charge one base shipping rate for U.S. customers, a second base shipping rate for Canadian customers, and a third base shipping rate for everyone else? I suspect that it should go in eCart1_PHP.php but really don't know, and if I start adding some "IFs" on my own I'll tank my whole site, which is otherwise completed.

If it's easier, I can make the change using the dialog box in the eCart Object that pertains to shipping, but none of the suggested rules in the drop-down menu has anything to do with the country of the customer.

Please help! Thanks so much.

Sign in to reply to this post

Jason ByrnesWebAssist

you need to make the shipping rule in the eCart object.

The Shipping Country is stored in a session variable named:
eCartCheckoutForm_shipping_country

So your shipping rules will use the trigger "Based on session variable Value"

for example, For the US:
"Based on session variable value"
If the session variable 'eCartCheckoutForm_shipping_country' is '=' value of 'US'

for Canada:
"Based on session variable value"
If the session variable 'eCartCheckoutForm_shipping_country' is '=' value of 'CA'

For the rest of the World
"Session Varibale Exists"
Session Variable Name: 'eCartCheckoutForm_shipping_country'

AND
"Based on session variable value"
If the session variable 'eCartCheckoutForm_shipping_country' is '!=' value of 'CA'

AND
"Based on session variable value"
If the session variable 'eCartCheckoutForm_shipping_country' is '!=' value of 'US'

Sign in to reply to this post

Sara

Should all three rules (US, CA, elsewhere) share the title "Shipping & Handling," or does it matter?

Sign in to reply to this post

Jason ByrnesWebAssist

they should use separate names.

Sign in to reply to this post

Sara

When I hit "OK" after creating each rule, I get this error message:

While executing onClick in WA eCart Object.htm, the following JavaScript error(s) occurred:

At line 454 of file
"C:\Users\[Redacted]\AppData\Roaming\Adobe\DreamweaverCS6\en_US\Configuration\Shared\WebAssist\eCart\Library\WA_GeneralUI.js":
treeNodes[newIndex] has no properties

And I can't close the dialog without canceling out.

This might be because I gave all three rules the same title, thinking that the program would look for rules "Shipping & Handling," then deleted them and created new rules with different names. But the program can't hold that against me forever, which is what it's doing now. I can't effect any change in the Shipping tab of the dialog box.

Sign in to reply to this post

Jason ByrnesWebAssist

the code for the rules will need to be deleted manually from the eCart1_PHP.php page, send a copy of that page, and i'll tell you what code to delete.

Sign in to reply to this post

Sara

Here's the file. Thanks for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

change line 81 - 83:
$this->Shipping[] = new WA_eCart_Rule(urldecode("Shipping%20&%20Handling"), true, "WAEC_eCart1_ShippingHandlingElsewhere");
$this->Shipping[] = new WA_eCart_Rule(urldecode("Shipping%20&%20Handling"), true, "WAEC_eCart1_ShippingHandlingElsewhere");
$this->Shipping[] = new WA_eCart_Rule(urldecode("Shipping%20&%20Handling"), true, "WAEC_eCart1_ShippingHandlingElsewhere");

to:
$this->Shipping[] = new WA_eCart_Rule(urldecode("Shipping%20&%20Handling"), true, "WAEC_eCart1_ShippingHandlingElsewhere");

Sign in to reply to this post

Sara

Last question, most likely a stupid one: Does the script go through the rules one by one and test them, so that only the first listed one (US) needs to ask whether the cart contains more than zero items? Or do all of the rules need to have that qualifier?

Sign in to reply to this post

Jason ByrnesWebAssist

all need to have that qualifier

Sign in to reply to this post
loading

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