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.

Free Item with Purchase of Product from a specific category

Is there a way to set up a discount for a category that will only apply if a different category product is in the cart. For example i want to give a free tee with the purchase of pants. So apply a 100% discount to the tee if category bottoms, jeans, or pants is present in the cart as well.
  • fc_jedfc_jed FoxyCart Team

    It’s actually not something we support out-of-the-box, but you could achieve something with javascript. Are you comfortable with coding the customization? If not, I could whisper you a list of recommended developers.
  • @fc_jed
    if you have some examples of javascript that achieves this i can probably make it work, but only on the checkout screen not in the cart.
    So the javascript would be automatically apply this coupon code if x category is present.
  • @fc_jed
    or is it possible to create a coupon code for 100% discount for any item below $100 and then I will apply the discount to only 1 category. But the discount can only apply to 1 item in the category, if the customer has 2 items from the discounted category it will only discount 1 of them.
  • fc_jedfc_jed FoxyCart Team
    edited September 2015

    Unfortunately, we don't have a pre-made code snippet for your first requirement as well. That's something you would need to code with a developer.

    Fortunately, we do have something that caters to your second one. At least, as close as it can get to it. Have a look at this snippet for more information on how to implement a free shipping coupon:

    When you create a coupon in your store admin, you can specify which categories it applies to by unchecking all categories and selecting all the coupons that apply.

    Do note though that coupons apply to the total price of the items it applies to. If you want discounts to apply to specific items, then you would need to implement product discounts. Have a look at this link for more information about the difference between discounts:

    @fc_adam also noted that you might want to implement this as well:

    However, there's no re-rendering in 1.1, so that's something that needs to be handled.
Sign In or Register to comment.