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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to include product specific discounts to my current cart..??

Thread began 7/22/2011 3:38 am by angelleye | Last modified 7/22/2011 8:28 pm by angelleye | 957 views | 6 replies

Ray BorduinWebAssist

Comma separated will work, but it depends on the end user not having any typos and entering valid data which could be hard to validate.

A separate table might be easier because you could use the manage relational table and multiple insert and multiple update server behaviors from dataassist to help, but because of the complexity those are no walk in the park for most people, and would be extra work and complexity from the developer perspective, although would likely result in a more user friendly result for the end user.

The single table would depend on returning the comma separated field in a recordset, then exploding that into an array. The separate table technique you would loop through the recordset and probably also want to store the data in an array.

Ultimately you would have to have a nested loop that loops through both the array of supported products and compares it to each of the products in the cart to set the discount. Both techniques will involve hand coding and a strong knowledge of php to pull off effectively. Both have pros and cons and ultimately you should use whichever you are most comfortable with and whichever makes the most sense to you.

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