close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding a calculation to add extra cost to total

Thread began 4/06/2012 8:22 pm by phil107723 | Last modified 4/10/2012 1:19 pm by phil107723 | 1401 views | 4 replies |

phil107723

Adding a calculation to add extra cost to total

Hi
My product is $200 but a larger size is $50 more. I edited the TotalPrice calculation like this [price]+[option]*[quantity] and this works perfectly up to a point. If a customer wants to buy a second one of the same item it only adds the extra $50 not the cost of the item ($200).
I am giving the option as <input type="radio" name="eCart1_1_FourInchOption_Add" value="50" />.

Any advice would be greatly appreciated.

Thanks
Phil

Sign in to reply to this post

Jason ByrnesWebAssist

the calculation should be:
([price]+[option])*[quantity]

the grouping parentheses are important.

Sign in to reply to this post

phil107723

Hi Jason
Didn't work after adding the option for the first product(so plus $50) when adding the second item of the same product to the cart it deducted the $50 from the first as well.

I tried this idea you talk about here:
showthread.php?t=25444 but couldn't get it to work either . My options are 4 inch extra $50 or 7 inch no additional charge.
Thanks for your help

Sign in to reply to this post

Jason ByrnesWebAssist

In the cart object, is the Size column set to be unique?

this will treat different size products as separate line items to only apply the additional option price to the larger one.

Sign in to reply to this post

phil107723

Hi Jason
Sorry I redid my initial work today and it worked perfectly. I think after trying different things the other day it all got a bit confused.

As always thanks for your help and patience.
Phil

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