close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Help eCart Calculations

Thread begun 6/25/2014 11:04 am by Brendan | Last modified 6/25/2014 11:36 am by Jason Byrnes | 754 views | 3 replies |

Brendan

Help eCart Calculations

I had this working previously, but cannot figure out what I would have changed to cause it not to work.

I have an add to cart button where I have 2 Checkboxes. The default value on the checkbox is 1. I created a calculation called GolfSingle with the formula [RegGolfSingle]*75 - "RegGolfSingle" being the name of one of my check box fields. Then another calculation called GolfFour with the formula [RegGolfFour]*275. Finally, I have a calculation named TruePrice - [TotalPrice]+[GolfSingle]+[GolfFour]. As i said, I had this working, but now the additional amounts are not being added in the shopping cart. I have checked to make sure the "TruePrice" binding is in the "Total" column in my shopping cart.

Any help is greatly appreciated. I'll add the site address, and FTP info to the PM section

Sign in to reply to this post

Jason ByrnesWebAssist

On the cart display page, you where showing the Price in the Price field, I updated it to show the truePrice.


you should also update the total price calculation:

[Price] * [Quantity]


to use the calculations for true price in the price field:

([Price]+[GolfSingle]+[GolfFour]) * [Quantity]

Sign in to reply to this post

Brendan

After updating the Total price calculation, I am getting

Parse error: syntax error, unexpected '[' in /home/ltacorg/public_html/WA_eCart/LTAC14_PHP.php on line 10

here is line 10

$itmObj->TotalPrice = ($itmObj->Price+[GolfSingle]+[GolfFour]) * $itmObj->Quantity;//c

I tried the calculation both with a space before and after the "*", and without

Sign in to reply to this post

Jason ByrnesWebAssist

are [GolfSingle] and [GolfFour] columns? Or are they calcualtions?

you cant use calculations names in a calcualtion. you would need to use the calcualation itselct in place of the name, so if

GolfSingle is the name of the calculation defined as:

[RegGolfSingle]*75


you would use the definition in the total price calcualtion:

([Price] + ([RegGolfSingle]*75) + ([RegGolfFour]*275)) * [Quantity]

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