close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Need some help setting up a calculation rule please...???

Thread began 6/18/2010 8:35 pm by angelleye | Last modified 8/16/2010 8:22 am by Jason Byrnes | 3658 views | 16 replies |

angelleye

Need some help setting up a calculation rule please...???

I've got an item that we sell for $49.99 but if you add more than 1 of that particular item you get the extras at $15/each. For example, if you buy 3 of them the line item total would be $79.99. This is only for that item, though, so it needs to be based on the ID or something..??

Any information would be greatly appreciated. Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

You can do this as a discount using the item ID as the trigger.

For the trigger select "Number of Items with a Specific Column Value":
Number of items where 'ID' has a value of '1' is '>' a value of '1'

This assumes the discount is applied to item ID 1, change this to the ID you wish to use.


For the discount calculation use "Based on Multiple of Column Subtotal":
SubTotal of Column 'Quantity' 'Times' '34.99' 'Minus' '34.99'

Sign in to reply to this post

angelleye

perfect!

Works perfectly. Thanks!!

Sign in to reply to this post

angelleye

whoops...

I take that back. It works as expected when that item that gets discounted is the only item added in the cart. When I add other items as well, though, it's not adding up. It seems to be applying the discount to ALL extra items in the cart. Not just the items that have the particular ID. I set it up just how you said, though, except for some pricing changes.

The item ID I need to discount for extras is 2. The price of the first one is $49.97 and the price of the additional ones is $15.00. This should only apply for this particular item. All other items should increment their price like normal. Here's a screen-shot of what I did based on your reply...



After applying that rule I go to the site and add the software item multiple times and it correctly calculates a discount to give me the expected grand total. Here's a screen-shot of that, working as expected...



The problem is if I have other items with different ID's it's applying them to the discount. For example, I have another item that is $49.97 as well, but it doesn't get discounts for additions. It's not working out that way, though. Here's a sample of 2 software items (where the second should get the discount) and 1 hardware item that shouldn't be discounted at all.



As you can see it's still giving the same break-down simply because there are 3 total items in the cart. What I need, though, is for the grand total in this last example to be $114.94. That breaks down to $49.97 for the first software item, $15.00 for the second one, and then $49.97 for the hardware item.

Any information on what I did wrong here would be greatly appreciated. Thanks!

Sign in to reply to this post

CraigRBeta Tester

dirty fix ?

Jason may well have a better solution, but after fiddling for a while, i got this to work...

Set the calculation to flat rate.

set the discount to...

((floatval($this->GetInfo("2", "Quantity")) * 15)-15)

where 2 is the ID of the product

this should discount $15 for each item after the first for the product id 2 (only).

Sign in to reply to this post

Jason ByrnesWebAssist

Good one Craig, that's an excellence fix, not dirty at all.

Sign in to reply to this post

angelleye

screenshot?

Can you show me a screen-shot of how to set that up? I'm a little confused with the drop-downs. Do I just set it to Flat rate and put in that calculation, or what? And what do I do for condition in that case? Just a basic one to ensure items are in the cart..??

Sign in to reply to this post

angelleye

cool!

Looks like that got me there. I actually need to discount 34.97 after the first one because the additional unit price should be $15, but yeah, this seems to be working. Thanks guys!

Sign in to reply to this post

Jason ByrnesWebAssist

excellent, glad to her it is working.

Sign in to reply to this post

angelleye

ugh!

Again, I take that back. Now it's adding the $34.97 to my hardware product if I don't have software included in the cart.

Here's what I'm working with: product-list.php

As long as their is at least 1 software item (id 2) added to the cart it's calculating things correctly. When I don't have software added, though, it's adding the 34.97 to the price of the hardware and throwing that into the total. So the subtotal shows the correct price of $49.97 but then the Grand Total is showing 84.94. It's not showing my the discount lines in the summary, though, so I'm a little confused here.

Sign in to reply to this post
loading

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