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

some advice needed please

Thread began 12/09/2014 11:13 am by Jamie | Last modified 12/09/2014 2:47 pm by Jason Byrnes | 413 views | 6 replies |

Jamie

some advice needed please

Hey Jason

Am putting together a very simple ecommerce pack for a client and they have the following 'products': http://prntscr.com/5exld8

Just wondering what your advice would be on the 'best' way to structure the database for this type of structure. Would it be best to have 3 tables for the relevant options ? Or would there be a better way?

thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

I Would use one table:

+----------------------------|-----------|-----------|--------+
| Name | BasePrice | SingleInc | DblInc |
+----------------------------|-----------|-----------|--------+
| Varilux / 1 Day 13 delgate | 109 | 129 | 149 |
+----------------------------|-----------|-----------|--------+




in the cart object create columns for the SinglePriceInc and DblPriceInc.

In the add to cart button create a drop down for the Independents Day / Single Room / Double Room options, and bind the SinglePriceInc and DblPriceInc columns to the corresponding columns in the database, bind the Price column to the base price

and create a calculation to change the price based on the selection for example if the option columns is named option and the values are:
1 Day
Single Room
Double Room

Calcualtion:
TruePrice
(abs([option] == '1 Day')?[Price]:0) + (abs([option] == 'Single Room')?[Price] + [SinglePriceInc]:0) + (abs([option] == 'Double Room')?[Price] + [DblPriceInc]:0)

and in the cart display use the true price calculation in place of price, you' also need to update the total price calculation.

Sign in to reply to this post

Jamie

Sorry am a little confused- yeah I know, not hard!

there are 3 'products' (which need to be editable by the client):

Varilux /iDay 13 Delegate
All Other Delegates
Practice Team (3 People)

Each product has got 3 options (again, need to be editable by the client)
iDay only
iDay/iNight Single
iDay/iNight Double

Each of those 'products' has got 3 possible prices based on whether its full price or one of the 2 early bird prices (dates need to be editable by the client)

Due to the need to be able to edit and add/remove product, option and price and choose any combination, that setting up 3 tables.


ProductItems (for the Varilux /iDay 13 Delegate, All Other Delegates, Practice Team side of things)
ProductOptions (for the iDay only,iDay/iNight Single, iDay/iNight Double side of things)
CombineProduct to pull the 2 above together (with dynamic drop downs) and including the price as a text input...

How would I achieve that with a 1 table version?

Sign in to reply to this post

Jason ByrnesWebAssist

look at my example above.

it shows one product, you can add additional products

the idea is that the product has the base price, then the incremental price for the single or double option.

using the calculation example i gave you can alter the price based on the selection.

of course, if you are more comfortable with using three tables for this: by all means, go ahead. you asked for alternatives though, and this is an alternative.

Sign in to reply to this post

Jamie

I did ask for an alternative, just trying to understand it, thats all.

So with your your example, how does the 3 different price points work (full price, early bird 1 and early bird 3)?

Sign in to reply to this post

Jason ByrnesWebAssist

each date is a separate product

I'm looking at your screen shot as a separate product for each line item, so basically 9 products, 3 for each date section.

Sign in to reply to this post

Jamie

ah ok i see

so, how would the various different options be editable dropdowns?

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