close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

adding product options - sizing

Thread began 8/15/2011 10:01 am by sjuno299871 | Last modified 8/15/2011 11:59 am by Jason Byrnes | 536 views | 1 replies |

sjuno299871

adding product options - sizing

I have not followed something right
I creating 2 more carts almost like the one we did last week I worked all weekend on it now I am confused. I added the incrementSize but I must have missed something in our talk.
I added
(abs([size] == '2XL')?[sizePriceInc] = 2:'')+(abs([size] == '3XL')?[sizePriceInc] = 4:'')+(abs([size] == '4XL')?[sizePriceInc] = 6:'')

I used the same code as in the cart we were working on. But I get this error message.

Parse error: syntax error, unexpected '[', expecting ')' in C:\xampp\htdocs\NOBS\WA_eCart\NOSB_PHP.php on line 13

not working In NOSB_PHP.php Line 13 reads
$itmObj->incrementSize = (abs([size] == '2XL')?$itmObj->sizePriceInc = 2:'')+(abs([size] == '3XL')?$itmObj->sizePriceInc = 4:'')+(abs([size] == '4XL')?$itmObj->sizePriceInc = 6:'');//c

working in the other cart Ecart1_PHP.php line 13 reads

$itmObj->incrementSize = (abs($itmObj->size == '2XL')?$itmObj->sizePriceInc = 2:'')+(abs($itmObj->size == '3XL')?$itmObj->sizePriceInc = 4:'')+(abs($itmObj->size == '4XL')?$itmObj->sizePriceInc = 6:'');//c

what might I have done wrong I can see its [size] and $itmObj- is the issue what does that mean to me?

Sign in to reply to this post

Jason ByrnesWebAssist

the error means that one of the columns referenced in the calculation:
[size]
[sizePriceInc]


does not exist.


keep in mind that php is case sensitive, if you name the column "Size" that is not the same as naming it "size" and will cause the error you are getting. on the columns tab, what are the names of the columns you have created, including the case?

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