Apply a Quantity Discount

Questions and answers about ShopSite Custom Templates

Apply a Quantity Discount

Postby inhouse » Thu Jul 21, 2011 9:54 am

Hello,

I have my shopping cart pretty much set up; however, I am trying to add in a discount for quantities above 500. The cart is set up with a base price of 3.32. The quantity multiplies the price just fine. Now I need to reduce the price by 0.05 per item for orders over 500. The quantity is set up as an option in a drop down. You can see my cart here: http://protech.accountsupport.com/store/index.html . I was checking out Advanced Options, but I'm getting confused as to where to find these options and how to implement this discount.

http://protech.accountsupport.com/store/index.html
http://shopsite.com/help/10.2/en-US/sc/pro/index.htm?page=/help/10.2/en-US/sc/pro/ordering.options.html
inhouse
 
Posts: 27
Joined: Wed Jul 13, 2011 6:27 am

Re: Apply a Quantity Discount

Postby Jim » Thu Jul 21, 2011 10:18 am

The store you posted a link to is running ShopSite version 10 r7.4 so it does not have the advanced ordering options you are seeing in the 10.2 help.

To modify the price of an option you add a ;<modifier> after the option name so for a discount over the 500 gallon level you would compute a value that will modify the price to what you want it to be.

I don't know how you have your options configured currently so can't say exactly how you would do it. If you can post the options as you have them configured I could perhaps figure out how to do it. It would perhaps be as simple as 500 gallon ;*475 since a discount of .05 X 500 would be 25 and you just subtract that amount from the 500 to give a multiplier of 475.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Apply a Quantity Discount

Postby inhouse » Thu Jul 21, 2011 10:36 am

Hi Jim, thanks for the reply. Here is my options. I tried adding in a 0.05 price reduction after the quantity multiplication but the cart won't recognize it. Either I did it wrong or it will only allow for 1 modifier per option?

Code: Select all
Choose A Product;n
Regular ($3.37)
Winter Mix ($3.80);+0.43

150 Gallons;x150
Fill My Tank;x150
175 Gallons;x175
200 Gallons;x200
225 Gallons;x225
250 Gallons;x250
275 Gallons;x275
300 Gallons;x300
325 Gallons;x325
350 Gallons;x350
375 Gallons;x375
400 Gallons;x400
425 Gallons;x425
450 Gallons;x450
475 Gallons;x475
500 Gallons;x500
525 Gallons;x525
550 Gallons;x550
575 Gallons;x575
600 Gallons;x600
625 Gallons;x625
650 Gallons;x650
675 Gallons;x675
700 Gallons;x700
725 Gallons;x725
750 Gallons;x750
775 Gallons;x775
800 Gallons;x800
825 Gallons;x825
850 Gallons;x850
875 Gallons;x875
900 Gallons;x900
925 Gallons;x925
950 Gallons;x950
975 Gallons;x975
1000 Gallons;x1000
inhouse
 
Posts: 27
Joined: Wed Jul 13, 2011 6:27 am

Re: Apply a Quantity Discount

Postby Jim » Thu Jul 21, 2011 12:29 pm

only one modifier is allowed per option. So instead of using the full gallon number after the ; compute what the multiplier for that quantity is.
Since you are giving a 5% discount multiply the number of gallons time .95 to give the actual number of gallons being charged for


500 Gallons;x500 this would be 475 or 500 Gallons;x475
525 Gallons;x525 this would be 498.75 or 525 Gallons;x498.75
550 Gallons;x550 this would be 522.5 or 550 Gallons;x522.5
575 Gallons;x575 etc.

The shopper only sees the part before the ; so they would only see
500 Gallons
525 Gallons
550 Gallons
575 Gallons
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Apply a Quantity Discount

Postby inhouse » Thu Jul 21, 2011 12:34 pm

Jim, it's not 5% discount, it's 5 cents per gallon. A percentage will not work since the price of 1 gallon changes all the time. We've been around this block and decreasing the price by 5 cents is the only way to do this mathematically.
inhouse
 
Posts: 27
Joined: Wed Jul 13, 2011 6:27 am

Re: Apply a Quantity Discount

Postby inhouse » Fri Jul 22, 2011 6:01 am

I was given this formula and advice from my engineer friend. I have no idea how to apply this to a shopping cart option or checkout price. Who knew it was so complicated to add a discount to the price?? Anyone from ShopSite have any suggestions? Do we need to pay an additional $20/month for Pro? Seems a little silly for a 1 product cart.

(CP-.05) / CP) This will give you the fractional cost per gallon based on your CP. Take the output from this equation and multiple it by the calculated total at full price, if volume is greater that 500.

Example:
Full price for 650 gallons:
$3.37 * 650 = $2,190.5

Reduced price for 650 gallons:
((3.37-0.05)/3.37)) = 0.9851
0.9851 * $2,1950 = $2,157.86

I don't know what program you're using, but it's simple logic in structured style code. I wish you could do if, then statements.

V = User Input in Gallons

If V < 500, then TP = (CP * V)
If V > 500, then TP = [(CP - $.05) * V].

Where:
V = Volume of fuel
TP = Total Price
CP = Current Price

Volume is the unknown variable based on the buyer's input. CP is a variable set by the site admin, and $0.05 is a constant.
inhouse
 
Posts: 27
Joined: Wed Jul 13, 2011 6:27 am

Re: Apply a Quantity Discount

Postby Jim » Fri Jul 22, 2011 10:18 am

Since only simple operators , + - / * are all that are allowed in the option modifiers I can't think of a formula that would allow 5 cents discount in an order option situation like you have defined.

The quantity pricing feature in Pro was designed to handle just such a situation. Trying to force the ordering options to function that way would involve manually computing the modifier for the different quantities each time you change the base price.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Apply a Quantity Discount

Postby inhouse » Mon Jul 25, 2011 8:22 am

Hi Jim, I have upgraded my account to Pro so I can get this discount feature. In the back office I have reduced the price by 5 cents/gallon, but the cart is not calculating any different than before. I think this may be because of the way the drop down menu alters the price rather than doing so with a quantity. I had some help in setting this part up so I'm not sure how I would change my cart around to get this discount feature to work. I also need to mention that there are 2 products a customer can choose from and they are different prices. You can see this in my cart. A price reduction needs to happen on both these options. It's looking like this cart needs to be completely rebuilt based on this simple discount feature.

Any way to discount by the entire order by 5 cents/gallon would be great.

I had also set up 2 new product options that reduce the price; however, I need a way to restrict this option for orders larger than 500 gallons. This is a work around option and not optimal.
inhouse
 
Posts: 27
Joined: Wed Jul 13, 2011 6:27 am

Re: Apply a Quantity Discount

Postby Jim » Mon Jul 25, 2011 9:51 am

Instead of having the number of gallons be selected from an order option you need t have it selected from a quantity field. Then the quantity price will come into play because it will know what the quantity is. Selecting the quantity from an order option leaves the quantity field as 1 so the discount will not be applied.

The form field for quantity is in this format. "productrecord#:qnty". So to add a quantity select box to your product you would add code like this to the form. The ### would be the product number

<br>Quantity
<select name="###:qnty" size="1">
<option value="100">100</option>
. . .
<option value="250">250</option>
. . .
<option value="500">600</option>
</select>


Then when the shopper selects a quantity from the pull down the number of gallons will be passed to the cart and the price will be based on the number of gallons not an order option.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 27 guests