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.

Greater highlight for a discount?

sullivanandcosullivanandco Member
in Help edited April 2012
Hi folks --

some background: we're a design firm, doing a site layout, for a developer who's going to be using FoxyCart. Our client likes to run "buy 2, get 2 free" and "buy 3, ship free" promotions. On the examples page (, at the bottom, there are two discount examples, both of which show the discount as a rather small second line below the item name.

I realize that we can customize the look & feel of the cart, but this seems like something that may not be customizable in the way we'd like to -- for example, including text such as "Buy 2, get 2 free offer!", possibly in an additional field somewhere.

Would that be possible? I realize this should be a question for the developer, but first I'd like to get an idea of how easy or difficult the FC community thinks it would be.

Thanks in advance!
  • lukeluke FoxyCart Team
    It shouldn't be all that difficult with some jQuery to find a specific string and display it somewhere else. But, as you said, most things can be done purely with CSS (see for examples). Do you have any mockups of what you're envisioning?

    Also worth noting, we don't support free shippion coupons out of the box (yet), but we do have a code snippet you can add to your checkout which should help:
  • Thanks Luke -- I should have an example soon. The snippet is sure to be of use to the developer, but it's a little out of my depth... :-)

    Get back to you soon!
  • lancelance Member, Community Support Member
    @sullivanandco -

    Just to echo Luke, displaying things in the cart or checkout where you want them won't be difficult for a developer familiar with jQuery and/or CSS, so feel free to forge ahead with the knowledge that what you want is possible one way or another.

    Once you have a more concrete example, I suspect we'll be able to offer you some much more precise insights / suggestions.

  • Thanks, Lance --

    Okay, here's an idea of where we're going. Thoughts/comments?

    I'm not embedding the image because it's a little wide for this column width.
  • lancelance Member, Community Support Member
    @sullivanandco -

    I see a few ways that you could achieve something like you're trying to do. One of the easiest would be to use the discount method shown in the examples you reference in your original post ( and use CSS to make the discount line appear in a more prominent manner. For instance:
    .fc_cart_item_discount {
        font-size: 14px !important;
    Of course, the issue with this method is that the customer would need to add the total number of items to the cart to get the discount. So, for instance, if it is Buy 3, Get 1, the customer would need to add 4 to the cart and the discount would be applied to effectively make the fourth one free.

    Another option which gets much closer to what you have shown in your example is to check the contents of the cart and, if the criteria are met, add another "free" product. This would display the free product as its own line item. You would need to check cart contents to make sure that the criteria are met each time the cart is updated, so a customer doesn't meet the criteria, get the free product added, and then remove the qualifying product and still checkout with the free product. This option would certainly require a developer to assist, but can be done pretty easily using JSONP.

    Does this help?

  • That's great. Thanks very much!
Sign In or Register to comment.