close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Can I use the same 'products' database table to add a second product for a different eCart object.

Thread began 11/09/2016 5:46 am by s.joiner74419001 | Last modified 11/11/2016 4:59 pm by Ray Borduin | 387 views | 3 replies |

s.joiner74419001

Can I use the same 'products' database table to add a second product for a different eCart object.

I currently have a membership application form on our website that uses eCart for the user to be directed to a PayPal system to pay the fee after completing the form. The 'Add to eCart' behaviour uses the 'products' database table to get the membership data to build the correct transaction.

I am wanting to introduce a second type of membership that will be using a new application form with its own eCart object and my question is can I add this as a second product to the 'products' database table that the previous application uses. My concern is that I assume they will both have to reference there primary key, but when I inspect the code in the 'eCart Add to Cart' behaviour it appears to bind the data by the column name and not the data row.

such as - $ATC_itemID = "".$row_rsProduct['ProductID'] ."";

Hope this makes sense.

Thanks in advance

Sign in to reply to this post

Ray BorduinWebAssist

Yes, you should be able to use the same products table without any problems.

Sign in to reply to this post

s.joiner74419001

Hi Ray

OK, well then where does it reference the correct ProductID, because I can't see anywhere in the code where it does. That is my concern, because if I add a second product to the table where does it determine which product to use for the cart? In the 'AddToCart' behaviour it uses a recordset thats built around the products table. But there is no variable to determine which row to use. ( see attached screen shot ) Not a problem I imagine when there is only a single row of data in the table.

Im a bit out of my depth here but I just need to be 100% sure before I attempt to build this.

Thanks in advance.
Steve

Sign in to reply to this post

Ray BorduinWebAssist

Is this on a results page or details page?

Once you add a second product, this page will be filtered to display that product. Then it will get the ID from the recordset where the product is displayed. The code is on line 51 where it refers to the ID from the recordset which will be different for each product.

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