close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple questions about calculations

Thread began 6/11/2012 7:41 pm by Dennis | Last modified 6/15/2012 6:32 pm by Dennis | 606 views | 4 replies |

Dennis

Multiple questions about calculations

These questions are for a static page

1 .Our price increase for larger sizes is different for t-shirts ($3) than sweat shirts ($5). I’ve created both a tSize column (select list) and sSize column (select list). Ffrom other threads on the forum I’ve believe I would use the following calcs. But how do I combine the two into one calculation (what does “?[Price]” mean?

(abs([tSize] == '2XL' || [tSize] == '3XL'))?[Price] + 3:[Price]
(abs([sSize] == '2XL' || [sSize] == '3XL'))?[Price] + 5:[Price]

2. I would like to provide for the option of Pickup or Shipping via a select list, how would I go about doing this either by item or total order, whichever is easiest/preferred?

3. How can I prevent the selection of the shipping option for orders placed from outside the US (we can’t handle the shipping)

4. How can I limit the quantity of each item?

5. The cart will include some items that have PayPal fees and some that do not, how can I accommodate that?

6. How do I include the calculation of PayPal (standard) fees including the extra percent charged on orders placed outside the US.

Thanks,
Dennis

Sign in to reply to this post

Jason ByrnesWebAssist

1) Calculations are performed on a line item basis.

The calculations use a ternary expression. a ternary expression is a shortened if statement:

question?true part:false part

to addd the 2 calculation together, you simply use the plus operator between them:

((abs([tSize] == '2XL' || [tSize] == '3XL'))?[Price] + 3:[Price] + (abs([sSize] == '2XL' || [sSize] == '3XL'))?[Price] + 5:[Price])

I thing the correct calculation though for your needs would be:
[Price] + (((abs([tSize] == '2XL' || [tSize] == '3XL'))?3:0) + ((abs([sSize] == '2XL' || [sSize] == '3XL'))?5:0))

2) Add the pick up check box to the checkout page. Add a hidden form element on the confirm page of the same name to capture the value posted from the checkout page, and add a set session value behaivor to set a session id the checkbox is checked.

on your shipping rules, set a trigger that will cause the shipping to not apply based on the session value.

There are a bunch of threads in this forum that will explain it in more detail.

3) on the checkout page, remove all the other counties from the shipping country selcct list.

4) that can be done using a calculation, the exact details depend on how the quantity should be limited. Do all items get the same limit, or some items have a different limit.

5 + 6) On the charges tab, you will need to create charges that will add the paypal fees.

Sign in to reply to this post

Dennis

Jason,

Thanks for the ternary expression explanation.

From the Product Options with eCart tutorial...

  Now that you have made changes to your eCart Object, you will need to update the shopping cart page to contain the new columns. This requires that you remove the Shopping Cart instance from your cart page, and insert a new one using the eCart Display Manager.  


Does the shopping cart have to be recreated anytime the eCart object is changed?

I am confused by the Unique checkbox in eCart Columns setup. Can you help explain it.

Can you help me further with the calculations to add PayPal fees. Only some of our items will have PayPal fees applied, how would you suggest I handle that?

The PayPal fee for our use is 2.9% + $0.30 per transaction on US purchases and 3.9% + $0.30 per transaction on Outside US purchases. How would I enter these calculations and distinquish US versus Non-US?

Dennis

Sign in to reply to this post

Jason ByrnesWebAssist

No, the shopping cart will only need to be recreated if you add new column that you wish to display in the cart.


The unique checkbox is used to mark columns that will cause an item added to the cart to be treated as a new line item. For example, if you add item one to the cart in Size small, then add it again in size larger, you would want to show 2 line items in the cart. If you don't set the size column to unique, it will show only one line item. Setting the Size to Unique tells the cart to treat the ID / Size combination as unique line items.

to apply fees to some items only, you need to crate a new column in the cart to mark those items. then create a charge using the Items With A specific column value calculation.


for the paypal fee, the billing ountry is stored in a session variable named eCartCheckoutForm_country


create 2 charges for the paypal fees, one using the trigger:
If Session variable eCartCheckoutForm_country exists:

AND Based on session Variable Value "eCartCheckoutForm_country" "!=" "US"

the other using the trigger:
If Session variable eCartCheckoutForm_country exists:

AND Based on session Variable Value "eCartCheckoutForm_country" "=" "US"


For the calculation, use:
Multiple of column subtotal

SubTotal for Column "Total Price" times "0.029" "plus" "0.30"

or for the none US charge:
Multiple of column subtotal

SubTotal for Column "Total Price" times "0.039" "plus" "0.30"

Sign in to reply to this post

Dennis

Thank You Jason,

Dennis

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