close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

dynamic select list different prices

Thread began 11/19/2014 4:09 am by sabastian130416448 | Last modified 11/20/2014 9:56 am by Jason Byrnes | 926 views | 5 replies |

sabastian130416448

dynamic select list different prices

Hi.

I have a database with product 1 (Vanilla Cakes) and product 2 (Chocolate Cakes).

Product 1 has 4 sizes - size 1, 2, 3 and 4 with size 1 = $1; size 2 = $2; size 3 = 3$ and size 4 = $4.

Product 2 also has 4 sizes - size 1, 2, 3 and 4 with size 1 = $1.50; size 2 = $3.75; size 3 = 4.90$ and size 4 = $5.

On my results page I now have a repeating region with all the different products in a separate row with their pictures, prices etc. Now instead of having four lines for product 1 and four lines for product 2, I want just one line for product 1 with a select menu where I can choose which size I want and another row for product 2 with the same choices.

I have gone through all the tutorials but I can't seem to find out how to do this. If all the prices are the same I know how to do it or if the sizes increase by a fixed amount I know how to do it but not how to have one product with different sizes and different prices for each size.

Is this possible with the Ecart extension or is this not something that I will not be able to do with Ecart?

Thanks for any help and/or advice.

Sign in to reply to this post

Jason ByrnesWebAssist

in the product options tutorial:
http://www.webassist.com/tutorials/Product-Options-with-eCart

there are two types of product options covered:
Color options without a price increment.
Size options with a price increment for certain sizes.

the section that deals with the size options will help you in creating this.

the Basic idea is this:

There is products table that defines the products

There is an option groups table that defines the groups: size , color.

Another table defines the options, small, medium, blue yellow. the options table has a column that links to the option groups table so define which options belong to which group, Small to size group, yellow to color group.

there is a product options table. this table is used to assign options to a given product. in this table there is a linking column to store the product ID. there is also a column for price increment.

on the page, you create a recordset to lookup the Size options for the product and use that recordset to populate the list using the productoptionid column as the value.

you create another recordset that will lookup the selected product option id to return the option name and price increment.

this recordset is used for the size column in the cart, and the size price increment column.

in the cart object, you create a calculation to set the true Price of the product as the price + sizePriceIncrement

the tutorial linked above coves the particulars of creating the needed recordsets and cart columns, and calculations.

Sign in to reply to this post

sabastian130416448

Hi Jason.

Thanks for the reply. I know how to do what you said but I want to know if you can do this with different prices? My product prices don't increase by a fixed amount according to size. Some can go up $1 some can go up $1.50 so there is no fixed price increase. Is something like this possible or not with the WA extensions?

Sign in to reply to this post

Jason ByrnesWebAssist

that is what the SizePriceIncrement column is for, to set the increment amount for each option, so that each option can have a different increment amount.

Sign in to reply to this post

sabastian130416448

The problem is that the prices don't increase by increments. They have random amounts at which they can increase.

Sign in to reply to this post

Jason ByrnesWebAssist

i understand the point of the tutorial is that you set a base price in the products table.

then in the product options table, you set the amount the price should increase by for each size.


for example, the base price could be:
$8.00

if you want the options sizes to priced as:

small = $8.00
medium = $11.50
Large = $12.00
X-Large = $14.50

in the product options table, the price increment column would be set as:
small = 0 (+ 8 = 8)
medium = 3.50 (+ 8 = 11.50)
Large = 4 (+ 8 = 12)
X-Large = 6.50 (+ 8 = 14.50)


those are just examples so you can get the idea.

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