The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Buy 3 Get 3 Free

marketing_guymarketing_guy Member
in Help edited March 2012
Even though this exact scenario is in the Wiki, I can't get it to function and hoping for some help. I'm using FoxyCart 0.7.2 and FoxyShop 4.0.

I'm trying to set up a Buy 3, Get 3 free promotion. Ideally, the person orders three or more (up to however many) and three more are automatically added to the cart at zero cost.

The Wiki states for Buy 3, Get 3 free to use discount quantity percentage and repeat. To use code like this: discount_quantity_percentage=My Discount{repeat|2-100}

So I did this via FoxyShop with this code:

discount_quantity_percentage=My Discount{repeat|4-100.00|7+0.00}

But the outcome was this:

Adding 6, it gave a 16.67% discount on all the products in the cart.

For 5 it gave 20% on all products.

For 4 it gave 25%

For 7 it billed them all regular price.

I contacted FoxyShop and he suggested checking with the forum.

I found a thread for a buy one, get one free and it said to put the product in it's own category and set up a discount that way, but use incremental. Tried that and nothing happened.

  • lukeluke FoxyCart Team
    The repeat flag only allows for one tier. Since you want the 4 product to give the amount of 3 products off, you can't just to 100% (that would only be one product), but instead would do 300% off. Try this:
    discount_quantity_percentage=My Discount{repeat|4-300}

    That way, for every 4th product they add, the first three are free.

    So assuming a $10 product:

    1) $10
    2) $20
    3) $30
    4) $10 (first three products are now free)
    5) $20
    6) $30
    7) $40
    8) $20 (first six products are now free)

    I'm not sure that's what you're looking for, but there it is. If you want to give 3 for 3 only once, you won't want to use the repeat flag. Make sense?

  • fredfred FoxyCart Team
    I think that you want to use the incremental flag to get the discount you want:

    This gives 100% off products 4-7 and then no further discounts. Due to the way we calculate and display the unit price & "discount percentage" they look a little odd but they are technically correct.
  • @luke

    That's not quite it. What I really want is for customers to be able to select 3 (or more) for the quantity of the product, and then 3 more are added to the cart at no cost.

    Basically an "auto-add" function, but I imagine that's out of the scope of the cart without custom coding.


    That's close. I can use that and just indicate to shoppers that if they add 6, the second three are technically free. As you say, it looks a bit odd, since then it just adjusts the overall unit price down to reach the correct total.

    If there is a way to do the "add three free" to the cart, let me know.

    Thanks guys!
  • lukeluke FoxyCart Team
    I gotcha. You'd probably have to do some JavaScript to check the cart contents and the coupons used and then add the products dynamically based on what you see there. How's your JavaScript knowledge? You may need to get a JavaScript developer involved to pull it off for you, but in theory it should work out.
  • fredfred FoxyCart Team
    @marketing_guy: just a quick note, if you add &quantity=6 to your cart links you can (sort of) accomplish what you want — when they click the link, they'll have 6 in their cart and 3 will be free.
  • Thanks Luke. Not a Javascript guy, but if needed I'll look into that.

    @fred I'm using FoxyShop, so the cart links are generated. Not sure how to customize them. I think for now we'll stick with what we have. Thanks!
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    edited April 2012
    You could use jQuery to change the value of the Quantity box

    EDIT: or you could set the minimum quantity on the product to be 6 and it would be 6 by default (but then they couldn't enter less than 6).
Sign In or Register to comment.