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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add to Cart Button (Dynamic)

Thread began 5/28/2010 1:21 am by mora398588 | Last modified 6/07/2010 5:32 pm by Eric Mittman | 946 views | 5 replies |

mora398588

Add to Cart Button (Dynamic)

I am currently using your Free eCommerce MySQL database to input data about products my business is looking to sell. At this time, I have all the data, including pricing, entered in the DB. I am now at the point where I need to create add-to-cart buttons for my web page.

I would like to create dynamic buttons, but I am uncertain how to create them while making sure they are pulling the correct data for each of my items. I have reviewed your solution recipes and getting started documentation; however, when you get to the point where you're adding the default values to the columns, how do I know that the button is accurately pulling the correct information for the product? I understand that I will be setting the value for the product ID, but how does eCart know which product to reference without letting it know which item?

I am not using repeat regions. I need to create separate buttons. Can you clarify the procedure for me?

Sign in to reply to this post

Eric Mittman

If you are not adding these buttons to a repeat region and have individual pages for the items then you do not need to do anything special. You just need to add a recordset to the page that will pull the details for the given item. Once that is on the page you can then add a regular 'add to cart button' on the page and in the bindings tab use the lightning bolt icon to select the values from your recordset.

This will ensure that you are adding the details for this item to the cart, if the details are updated in the db the dynamic references to the data will reflect this.

Sign in to reply to this post

mora398588

I have followed your last instructions. Though the "add-to-cart" button is pulling the data, it is not differentiating between the items in my DB.

For example, I added a separate "add-to-cart" buttons for two different items. When I tested the first button's functionality, I noticed that the correct item was displayed in the shopping cart. When I click on the second button, the same information was displayed. In other words, two of the same items were pulled from the database.

I am uncertain how to alter the binding's tab in the "add-to-cart" button so as to differentiate between the various items in my DB.

Thank you for your time in helping me with this issue.

Sign in to reply to this post

Eric Mittman

The reason that you are getting the same item added to the cart is because the same record is used in the add to cart server behavior. If you want to have multiple add to cart buttons on a page at once there are two choices.

You can either have a single recordset and use a repeat region around the add to cart form on the page or you can have multiple recordsets and multiple add to cart server behaviors on the page.

Which way would you like yours to be? Please post back with some details and include a copy of your current page.

Sign in to reply to this post

mora398588

Thank you for your assistance. I was able to work it out.

Sign in to reply to this post

Eric Mittman

Glad to hear that, did you end up going with a repeat region listing of the products or did you use filtered recordsets?

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