close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Continuing Calcualtion issue

Thread began 5/21/2011 9:48 am by James L | Last modified 5/23/2011 8:26 am by Jason Byrnes | 1277 views | 3 replies |

James L

Continuing Calcualtion issue

I couldn't find the original thread for this (I printed it and the header says t=20502) but it had to do with setting the height and width of a shipping box based on Quantity.

the code (copied from the ProResCart_PHP.php file on line 12 is:
$itmObj->boxheight = abs($itmObj->Quantity==1)?[ItemHeight]=8:[ItemHeight]=14;//i

the formula I entered in the eCart Calculations is:
abs([Quantity]==1)?[ItemHeight]=8:[ItemHeight]=14

Yet every time I try to open any of my pages in a browser I get this error:

Parse error: syntax error, unexpected '[' in /Applications/MAMP/htdocs/ProRes-from-scratch/WA_eCart/ProResCart_PHP.php on line 12

What's going on?

Sign in to reply to this post

Jason ByrnesWebAssist

what are the names of the columns in your cart?

this calculation is assuming that the item height column is named:
ItemHeight

Pay attention to case as well. The error suggests that the item height column is named something else. the calculation will need to be modified to use the correct name for the item height column.

Sign in to reply to this post

James L

data names look OK but is Type wrong?

I've a screen cap attached (from phpMyAdmin), indicating that the names are ok, but I'm now wondering about the Type. I'm using Integer, should I use something else? would that make the calculations work differently?

Sign in to reply to this post

Jason ByrnesWebAssist

I'm not referring to the columns in your database table, I'm referring to the columns in your eCart object.

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