Additional flat cost based upon quantity

FuzionMonkeyFuzionMonkey Member
in Help edited November 2008
Is there any way to do special pricing that will have this functionality:

100-250 Qty: Price per item is 0.78, plus $39 flat cost for that order
251-500 Qty: Price per item is 0.68, plus $54 flat cost for that order
etc.

So there's an additional flat cost based upon quantity that is added to each order.

I know you can change the cost per item based upon quantity tiers, but I'd like to add a flat cost per order (not per item) based upon quantity
Comments
  • lukeluke FoxyCart Team
    Hmm... interesting. You may be able to use a coupon code that you pass in automatically behind the scenes in conjunction with various discounts... discounts and coupons should be able to add costs to the cart as well subtract them. I don't think our standard handling fee will do the trick though.

    Other than that, you can always do some fancy javascript magic in the cart based on the json object. Check out this cart I did for a friend to get an example of what I mean: http://www.modernash.com They do custom shipping and delivery rates based on the zip code and the value of the items in the cart. That's all done in javascript (do a view source on the cart to see what I mean)

    Or, you can always request that feature here: http://requests.foxycart.com
  • FuzionMonkeyFuzionMonkey Member
    edited November 2008
    I'm not sure how I'd make a discount coupon add a flat cost depending on the quantity. How would I do that?

    I know I can add a cost based upon quantity per product but I'm not sure how I'd add flat cost to the whole order.

    But you're also saying I could just add some fancy javascript that would add a cost based upon quantity. That doesn't sound to hard, but isn't that kind of insecure? (Like someone could edit the JS)
  • brettbrett FoxyCart Team
    Oops, I just closed your request because from the description it sounded like quantity discounts...

    Is this a shipping request? Because if so, it'd probably go under "supership"... Just trying to get a feel for what this relates to most closely.
  • FuzionMonkeyFuzionMonkey Member
    edited November 2008
    No it would be a separate cost from shipping/handling. Technically it would be a printing fee for the entire order.
    This is what kind of pricing I am trying to do:
    95924876ko7.jpg

    Any ideas on how I would use javascript to do this, since I can't do it with current functionality?
  • brettbrett FoxyCart Team
    Ok I'm revising the request on our system to make it more clear...

    As far as pulling it off in the meantime... First of all, you'd have to use the quantity discount functionality for the item price, which shouldn't be a problem. The print fee is clearly more interesting, and I can't think of a situation where it's come up before.

    A little additional information might help us get you a better solution. Can the customer order multiple things at the same time, or are we only looking at one single product going through at a time?

    Do you want the charge to be applied per order (total quantity of items in cart at checkout), or per product (1000 of product A and 500 of product B get 2 separate print fees)?
  • lukeluke FoxyCart Team
    Hey Fuzion, did you get a chance to do a view source on the cart I was describing at http://www.modernash.com?

    That sounds very similar to what you're trying to accomplish.
  • FuzionMonkeyFuzionMonkey Member
    edited November 2008
    Yeah, I took a quick look at it, however I'm not exactly proficient at javascript.

    From what I could tell it looks like it is this script that is changing prices and shipping:
    http://www.modernash.com/_scripts/delivery-calculator.js

    Brett, thanks for making my request clearer. There are two types of products. One is just a regular product with regular pricing and shipping, the other uses pricing above. So theoretically a customer could purchase both types of products.

    For the second question, it would be the latter. Product A and Product B would have separate print fees.

    Thanks for the help guys
  • FuzionMonkeyFuzionMonkey Member
    edited November 2008
    Okay, so I figured out how to do the Print Fee using Javascript. This is what I coded to do this:
    function pricing() {
    
    [code]user_quantity = document.product.quantity.value
    
    [code]if (user_quantity <=250) {
    	document.product.price.value = '0.78';
    	fee = 39;
    	}
    if (user_quantity >= 251) {
    	document.product.price.value = '0.78';
    	fee = 54;
    	}
    if (user_quantity >= 501) {
    	document.product.price.value = '0.78';
    	fee = 69;
    	}
    if (user_quantity >= 751) {
    	document.product.price.value = '0.78';
    	fee = 84;
    	}
    if (user_quantity >= 1001) {
    	document.product.price.value = '0.68';
    	fee = 99;
    	}
    if (user_quantity >= 1401) {
    	document.product.price.value = '0.68';
    	fee = 114;
    	}
    if (user_quantity >= 1701) {
    	document.product.price.value = '0.68';
    	fee = 129;
    	}
    if (user_quantity >= 2001) {
    	document.product.price.value = '0.68';
    	fee = 144;
    	}
    if (user_quantity >= 2500) {
    	document.product.price.value = '0.68';
    	fee = 159;
    	}
    if (user_quantity >= 3001) {
    	document.product.price.value = '0.58';
    	fee = 174;
    	}
    
    [code]feeperproduct = fee/user_quantity;
    document.product.imprint_fee.value = "$"+fee+"{p+"+feeperproduct+"}";
    
    }[/code]
    [/code][/code]

    Right now it is targeting the quantity input and changing a custom attribute I have created, which will add the print fee and add the fee/product to each product.

    How would I change shipping/handling costs using javascript or custom attributes?
  • lukeluke FoxyCart Team
    How do you need the shipping/handling costs to change? I'm sorry if you explained it above, I just didn't get it. How are you doing shipping/handling now? How will that change? If it's dynamically determined by the matrix you already have then I would just add it into your custom fee and be done with it. Would that work?
  • Hmm. I guess you're right. I suppose I could set shipping to be free, then using javascript just add the shipping cost as an attribute.

    But there's no way to specify the shipping cost so it appears during checkout?
  • lukeluke FoxyCart Team
    That's what SuperShip will be about. Please leave comments there to make sure what we end up developing will meet your needs.
Sign In or Register to comment.