close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

can't resolve 'add to cart' / database issue

Thread began 5/21/2012 7:45 pm by lr_leal239405 | Last modified 5/22/2012 12:39 pm by Jason Byrnes | 990 views | 4 replies |

lr_leal239405

can't resolve 'add to cart' / database issue

I'm coming across this problem for a 3rd time....but slightly different. (I must reiterate that I am not a programmer but dabble in it in order to get some work done, thus the reason for having Webassist plugins).

In the first case I have a database in which one ID has 2 options....a CD or a DVD. The problem with this is that you could only select one because if you then selected a 2nd item it would simply add the first item for a 2nd time. The problem is that it's using one ID so it thinks it's the same item. I had solved this same problem on a small database by giving the CD and DVD a different ID and two different add to cart buttons. This case was solved by my friend who duplicated all the items for the DVDs thus giving them different ID.

In the new case I have 11,000 records for booking a date and 4 different time slots. When I pick a different time slot of the same date, it, of course thinks it's the same time slot that is being added to the cart. A young developer (kid just finishing H.S.) said to me that duplicating the items for each time slot seemed to be the solution without me having mentioned anything about my previous cases. I don't think duplicating all these records is the way to go and I definitely don't wish to do that. Can someone at Webassist give me another suggestion / solution? I thought of adding 4 different IDs but the selection for the times is a dropdown menu, so I wouldn't know what to do with the code from there on.

Thank you.

Sign in to reply to this post

CraigRBeta Tester

Another table

What you should do is have a second table with the 4 time slots, and a field in your orders table to store the chosen time slot with the booking .

This principle is the same as using options for T shirts, such as colour and size.

there is another thread here, showthread.php?t=21546&highlight=product+options which goes through a similar, (though slightly more complicated) process

Sign in to reply to this post

Jason ByrnesWebAssist

so in both cases the issue is that adding the same product with different options is adding the initial product again, is that correct?

when using options for your products, make sure to set the option column of the cart object to be unique.

In the Cart object editor, go to the column tab, select your option column, and check the unique option.

Sign in to reply to this post

lr_leal239405

Amazing how a little lack of knowledge and some sense can waste your life away. Jasons's answer took care of the problem. However, I liked CraigR's suggestion as well. I should've and will do it that way next time for the different options.

Thanks both for your answers and the solution.

Sign in to reply to this post

Jason ByrnesWebAssist

Craig's answer is the correct way to handle product options, but you would still have the same issue of the items being added to the same line item.

for the option to trigger a unique line item, you need to set the Unique attribute for the option column.

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