close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Javascript error adding eCart Add To Cart Button

Thread began 1/04/2013 7:05 am by Jared Lui | Last modified 1/07/2013 12:55 pm by Jason Byrnes | 1352 views | 7 replies |

Jared Lui

Javascript error adding eCart Add To Cart Button

I read many old posts regarding this error so figured it was resolved; however I am getting it now. I have deleted the windat file and have met the other requirements having the latest extensions in the correct order.

I am going through step by step the Integrating Data Bridge and eCart tutorial and when I get to the Add To Cart Button step where you select the "Look up item ID from recordset" I get the same JS error everyone else had.

I then tried to look at the recordset in Server Behaviors and got a message that the table did not exist so I then looked at the SELECT statement in the Source Code and saw that the table was there but had a lower case "p" (products). So I looked in the database and see that there is a Products table with a upper case "P" (Products). I changed the SELECT statement and now I do now get the Javascript error and the Recordset: and ID Column populate now in the eCart Add To Cart Button dialog.

Also, there are two order tables in the database (orders and Orders). Both have the same columns although orders has only 15 columns and Orders has 27 columns and they are not in the same order. Are both tables supposed to be here?

I started from scratch twice using blank databases and empty DW sites and followed the tutorial word for word and came up with the same results both times.

I'll try a third time after uninstalling all three extensions and deleting the Configuration directory and installing eCart 5.0.6, Design Extender 1.1.1 and Data Bridge 1.1.1 in that order (using DW CS5.5 on Win7) but first wanted to post this and get some feedback.

I'm guessing this a workaround but I have a question. Do you think this is user error and I made a mistake in the steps or is there an issue?

Sign in to reply to this post

Jason ByrnesWebAssist

sounds to me like you are using application presets that create the tables for you, one of the presets you are using is creating the tables with lower case name, and the other preset is creating the tables with upper case names.

when running the wizards for Data Assist and checkout, pay attention to the table names that are being created.

Sign in to reply to this post

Jared Lui

I understand what you're saying. And to verify I ran through a 4th and 5th time. The last two times I took careful notes every step of the way. The 4th time I went through the complete tutorial and noted everything. The 5th time through I stopped as there is no point going far because there are problems from the get go.

Keep in mind that the steps below are from the Integrating Data Bridge and eCart how to you directed me to and said to follow.

My notes are in **[brackets]**

Connect to your database
1. In Dreamweaver, make sure your site is selected
2. Click Window > Databases
3. Click the Add Database (+) button
4. Click MySQL Connection
5. Enter your Connection name, MySQL server, User name, Password, and Database as per your specific setup
6. Click OK
**[I did not have any issues here]**

Create pages in Data Bridge
1. Click WebAssist > Database > DataAssist Pages in the menu bar
2. Select Product Administration from the Application Type list
3. Ensure the database connection you just made is selected from the Connection list
4. Check the Create the database table for me checkbox if it isn't already checked **[this automatically checks if you choose Product Administration in the Application Type list - although I did verify it remained checked before clicking Finish below]**
5. Take note of the database table name that is created for the admin pages **[Products with an upper case "P"]**
6. Click Finish to make the pages
7. Close all pages that were opened
****** ISSUE NUMBER ONE ******
**[During my 5th attempt I decided to upload all files WA created at this point to the server and test. The files were everything in the admin, images, SpryAssets, and webassist directories. The Connections folder was already uploaded to the server during step 1 above. Also I verified that the Products table was in fact created in the database with an upper case "P". There were 24 columns in it. I tried to use the products_insert.php page to add a product to the database and it does NOT work. Upon clicking the Submit button the page appears to refresh and nothing is added to the database. I can manually add a product into the database and see it fine in the search, detail and results pages. I also see the info in the update page however updating gives the same results as the insert page.] This was the same results I had in the first 4 attempts at the tutorial. I'd expect a working set of pages from a tutorial.]**

On to the second issue

Create your Product Catalog pages
1. Click WebAssist > Database > DataAssist Pages in the menu bar
2. Select Product Catalog from the Application Type list
3. Ensure the database connection you just made is selected from the Connection list
4. Uncheck the Create the database table for me checkbox if it is checked **[unchecked by default if you choose Product Catalog from the Application Type list - however I double checked this prior to clicking Finish below]**
5. Verify the database table is the same as the one created for the admin pages **[It is Products with an upper case "P". The Key Column is set to ProductID. This should verify that the correct table (the only table) is selected.]**
6. Click the Manage Pages tab
7. Select the Results page
8. Click the Edit button
9. Uncheck the Include delete button in results list checkbox
10. Click OK
11. Select the Detail page
12. Click the Edit button
13. Uncheck the Include delete button in details list checkbox
14. Click OK
15. Click Finish to make the pages
16. Close all pages that were opened
******ISSUE NUMBER TWO*****
**[Actually everything appears fine at this point, only the one Products table shows in the database and no changes were made to it. The admin insert and update pages don't work of course still. However this is the point were the javascript error is initiated since the users products pages are created. The SELECT statements of both details and results pages have products (lower case "p"). These are the defaults from WA as used in the tutorial. I made absolutely sure the settings in the wizards are correct. There is something in the process that it making this happen.]**

I don't think there is any point on going through the rest of the tutorial as I think these are the reasons the rest is not working for me. I guess I want to know if I am really doing something wrong or if there is a problem in these steps or the process?

I'll try to muddle along the process creating these from scratch as I was prior to being led to the tutorial and see how it goes. I think I have a better understanding of the process at least.

Thanks.

Sign in to reply to this post

Jared Lui

Oh, BTW...
Further in the tutorial during the Create your Orders pages section, the Orders (upper case "O" table is created with the 27 columns.

The Run eCart Checkout Wizard portion of the tutorial a couple sections later is what creates the second orders (lower case "o") and orderdetails (also lower case) table. I triple verified the settings of "O"rders in the wizards.

Sign in to reply to this post

Jason ByrnesWebAssist

thanks for the details, that helps a lot.

we just released data Bridge 1.1.2 to correct the issue with the inserts and updates failing.

I am going through your steps to reproduce the problems with the table names and am forwarding the information to the documentation team so they can look into the issue and correct it.

Sign in to reply to this post

Jared Lui

Yay! I'm not 100% insane yet.

I'm going though the process again this time with the free WA database ignoring the steps that call for creating a database table thinking this is what was used to create the extensions as well as the tutorials. I'll keep you posted. I'll update to 1.1.2 after that since I'm halfway through and tryout the insert/update pages.

Thanks again Jason.

Sign in to reply to this post

Jared Lui

So far so good. Admin insert/update pages working with 1.1.2

Somewhere they want to add that you need to make the images directory writable in order to avoid a ton of errors when you try to insert thumb and fullsize product images. I'm sure this is covered somewhere else but for a first time user if this is the only tutorial they use they will get many messages on the screen and if they have never come across them they will be asking for support.

Will try the rest of the steps after dinner. Thanks for the update!

Sign in to reply to this post

Jason ByrnesWebAssist

the permissions for the image directory may or may not need to be changed, it depends on the server and how the directory gets created to begin with.

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