close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

ecart - Undefined variable error

Thread began 1/10/2012 9:11 pm by canmor51406258 | Last modified 1/11/2012 11:53 pm by canmor51406258 | 1823 views | 6 replies |

canmor51406258

ecart - Undefined variable error

Loaded up ecart on WAMP server and ran first time OK just to check out things. Removed ecart and modified a few pages and loaded it again and now I am getting - Undefined variable: ATC_itemQuantity in C:\wamp\www\Sport\viewDetailO.php on line 101. I did not bind this to the recordset as I do nit have a quantity variable in the product database (WA model but modified slightly) . Any suggestions where to look?

Sign in to reply to this post

canmor51406258

Sorry, zip file attached.

Attached Files
viewDetailO.zip
Sign in to reply to this post

Jason ByrnesWebAssist

this error will occur if the recordset used for the eCart button is empty when the add to cart button is pressed.


I see that your WADAproducts recordset is set to use a sizeChoice and colourChoice posted form element, but your add to cart button form does not contain these form variables, this is causing the recordset to return an empty data set when the add to cart button is pressed.

The empty data set is causing the undefined variable error.

Sign in to reply to this post

canmor51406258

Many thanks. I added missing fields and ran again. Came up with cart empty then after the third time same error came up - undefined variable. I have looked through code and cannot find any record that is not there. Attached modified file.

Attached Files
viewDetailO.zip
Sign in to reply to this post

Jason ByrnesWebAssist

its still the same problem


the products recordset is set to filter on form elements that dont exist.


remove the filter from the recordset for the color, size and gender, the add to cart button does not pass the values, so will not return a record if you are filtering the recordset on them.

Sign in to reply to this post

canmor51406258

If I remove them how do we select colour, size and gender?

Sign in to reply to this post

canmor51406258

This post has been deleted.

canmor51406258

Thanks Jason for all the help. I figured it out and its working A-OK.

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