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.
Comments
  • fc_jedfc_jed FoxyCart Team
    @samash

    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
    @samash

    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: https://wiki.foxycart.com/snippets/shipping/free_shipping_using_a_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: https://wiki.foxycart.com/v/1.1/coupons_and_discounts

    @fc_adam also noted that you might want to implement this as well: https://wiki.foxycart.com/snippets/checkout/adding_a_coupon_code_field

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