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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Options Determine Price - Price Based on Quantity

Thread began 9/24/2009 6:09 pm by christy342106 | Last modified 9/29/2009 10:31 pm by Eric Mittman | 2232 views | 5 replies |

christy342106

Options Determine Price - Price Based on Quantity

I have been reading through all of the documentation and posts about having your options drop down menu determine the final price of an item, and I can't seem to find anything about when you are applying it to only certain items in your store.

I have a store that sells individual items, so the basic quantity field works fine - simply type the number of that individual item you would like. However, I also sell greeting cards, and I am trying to figure out the best way to implement them into the cart. I have considered the route of setting the individual card at a certain price and then putting a discount on it once the customer orders so many cards. The only problem with that is the quick cart on the page would show something like "200 items in your cart". It seems a little better to sell the cards in sets - you might order a set of 200 cards, and it will show up as one item in your cart. So, if I populate a dropdown menu with the various set "sizes" and the different prices, I understand that from there I would change my add to cart function to get the total price based on the option the customer chose, correct? However, if I only want this to happen on the greeting card pages, how will this affect my standard single item pages? Should I create a separate item_detail page for greeting cards only?

I'm also considering setting the greeting card at a certain price and then using the drop down list of various sets as "options" that will add a certain amount to the total price. Would this be the easier, more efficient way to go? The greeting card item is $1, if you select the option of "20 cards", it adds $19 to your final price.

I greatly appreciate your advice on this one! It seems as if it should be so simple, yet I am having the toughest time trying to figure out how to make it happen. Thanks!

Sign in to reply to this post

Eric Mittman

You are correct about changing the add to cart to get the total price from the new select list. If you have multiple add to cart server behaviors on the page for the various items you will only need to adjust the one for the greeting cards. If you have it dynamic with a single add to cart it may be easiest to just have another detail page for the greeting cards.

Going the calculated route should yield a similar result. You can have the predetermined quantities available from a select list and a column in the cart to bind this list to. Then with a calculation you would set the total price to be based on this extra column so long as it has a value. Personally I think I like the idea of using the calculations as it requires less customizing of the code but you will need to craft the calculation for the total price to use this new column.

Sign in to reply to this post

christy342106

Calculation for final price

Thanks for your reply to get me headed in the right direction. I do have a dynamic site with only one 'add to cart' button, so I agree that it would be best to just add a calculation to determine the final price.

I have created a table in my database to populate the list of various quantities for the customer to choose from - "set of 20", "set of 40", etc. I created a new column in the cart to bind this list to. I now find myself on the cart page with the quantity column and updatable text field for the customer to use for any other item other than greeting cards. I also have this same issue on the detail page where the quantity text field and quantity select list are now both visible. I'm assuming that I should have a show if statement to make either the text field quantity OR the select list quantity available?

My next hurdle will be making the actual calculation to add the additional values for the final price. Quantity * Price + the value from the select list. I have a table in the database, "cardquantity", with fields, "QuanID", "AvailQuan" (description for select list), "QuanPrice", and "ItemCatID". Am I just adding the "QuanPrice" field value to the price calculation in the cart?

Thanks for all of your help and advice.

Sign in to reply to this post

Eric Mittman

If you would like to show only the quantity field or the select list then you will need some logic to have only one or the other show. If you are using the select list as a set type feature then the quantity would still apply, it would just need to be multiplied by the set number to get the true total price. You would want to alter the total price to have the quantity times this set value times the price for the total price. If you do it this way make sure you leave the set value as a default of 1 for this purpose.

Sign in to reply to this post

christy342106

That calculation works great to avoid showing large quantites in the cart, where you will be ordering "1 set of 20" or "1 set of 40" and the final price would be calculated by the total quantity.

My issue is that if you order a set of 20 cards, they are $.75 each. If you order 40 cards, they are $.72 each, and so on. I was attempting to have my select list determine the price, since I can't simply do the quantity times price for my total price. However, maybe I should do the item "sold in sets of 20", where the customer will type the quantity in the text field as usual, only a "2" means "2 sets of 20", and then create a discount where if they order a certain quantity of itemcategory2 (for greeting cards), then subtract a certain amount of money. Is there an easy way to create a discount based on a category number instead of an item number?

Otherwise, I can set the value of the quantity text field for cards to be 1, and then do a calculation for quantity times the price plus the additional price determined by the select list (20 cards are 15.00, 40 cards are 29.00, etc.).

Thank you so much for helping me with this - I know it's confusing. I'm thinking the easiest way to go is to not offer a quantity discount on greeting cards and then I'd be set!

Sign in to reply to this post

Eric Mittman

I think the approach of having users select the sets of cards will be the easiest to implement. When it comes to the discount for the quantity there is a condition that you can use for any column value. In the eCart object in the discounts when adding a trigger you should select the Number of items with a specific column value, then specify the category column and the criteria for the discount from there. I think this will yield the result you are looking for and be a little easier to get into place. Post back if you have any other questions or ideas on this.

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