Mastering Wix Events Discounts: A Velo Guide to Simulating 'Buy X Get Y' Offers

The ability to offer compelling promotions like "Buy X Get Y" (often seen as 2-for-1 or BOGO deals) is a cornerstone of event marketing. However, a recent discussion in the Wix Studio community forum, titled "Wix Events: Buy X Get Y (2-for-1) coupon rejected for tickets (HTTP 400)", highlights a significant challenge for store owners and developers looking to implement such offers for Wix Events tickets. This article delves into the core problem, analyzes attempted workarounds, and provides a Velo-enhanced strategy to simulate these desired discounts.

The Core Problem: Wix Events API Limitations for 'Buy X Get Y'

The forum participant's experience underscores a critical gap in Wix Events' native coupon functionality. While the Wix Coupons API "Use cases" page might suggest support for buyXGetY coupons with a scope namespace=events, attempts to create such a coupon for event tickets consistently result in an HTTP 400 error. This indicates that, despite documentation, the Wix Events system currently restricts coupons to only percentOff or moneyOff types.

Furthermore, the forum post clarifies that Wix's automatic Buy X Get Y discount rules, which typically apply to Wix Stores products, do not extend to Wix Events. This means event organizers cannot leverage the platform's built-in advanced discounting logic for tickets, forcing them to seek alternative solutions.

Analysis of Ineffective Workarounds

The community discussion reveals that common logical workarounds, while seemingly plausible, fall short:

  • 50% Off Coupon: Applying a simple 50% discount to all tickets fails for "Buy X Get Y" scenarios because it over-discounts odd quantities. For example, if a user buys three tickets for a 2-for-1 offer, a 50% coupon would discount all three, effectively giving 1.5 tickets free, which is not the intended 2-for-1 logic.
  • 100% Off + limitedToOneItem: Creating a 100% off coupon and limiting it to one item only frees a single ticket per order, not a true "Buy X Get Y" where the discount scales with the quantity purchased (e.g., buy 2 get 1 free, buy 4 get 2 free).
  • minimumSubtotal for Events Coupons: A critical issue raised is that the minimumSubtotal condition, vital for ensuring a coupon only applies when a certain purchase threshold is met, is not saved on events coupons. This means a moneyOff coupon intended to give one free ticket could inadvertently make a single ticket free, undermining the entire promotional goal.

These limitations collectively highlight the need for a more sophisticated, custom approach to achieve the desired promotional effect for Wix Events.

The Current State & Feature Advocacy

It's clear that the community recognizes this as a significant feature gap. The forum post explicitly mentions an open request in the Help Center (search: "Wix Events Request Automatically Applying a Buy 1 Get 1 Free Ticket Discount"). This underscores the importance of community feedback. Store owners and developers encountering this issue are strongly encouraged to vote on this existing request to help prioritize its development by Wix.

A Velo-Enhanced Workaround: Simulating 'Buy X Get Y' for Events

Given the native API limitations, the most robust solution currently available involves leveraging Wix Velo (formerly Corvid) to create a custom, dynamic discount experience. This approach simulates the "Buy X Get Y" logic by conditionally applying or removing a standard percentOff coupon based on the quantity of tickets in the user's cart. It requires careful implementation to avoid the pitfalls of the simpler workarounds.

Disclaimer: This is a simulation and not a native "Buy X Get Y" coupon. It requires custom code and may have edge cases depending on your specific event setup.

Step-by-Step Instructions for Velo-Enhanced BOGO Simulation:

  1. Create a Targeted percentOff Coupon in Wix Dashboard:

    Go to your Wix Dashboard > Marketing & SEO > Coupons. Create a new coupon of type "Discount by %". Set the discount to 50%. Crucially, under "Apply to specific events/tickets", select the exact event(s) and ticket type(s) for which this BOGO offer is valid. Do NOT set a minimum subtotal or minimum quantity here, as these features are not reliably supported or saved for events coupons as per the forum discussion.

  2. Hide the Default Wix Events Coupon Input Field:

    On your Wix Events registration page in the editor, select the native coupon input field. In the Properties panel, set its visibility to "Hidden". This allows your Velo code to control when and how coupons are applied.

  3. Implement Custom Coupon UI with Velo:

    Add a custom text input element (e.g., #couponCodeInput) and a button (e.g., #applyCouponButton) to your event page. This is where users will interact with your custom BOGO logic, if you choose to allow manual entry. Alternatively, you can make the discount automatic without a user input field.

  4. Add Velo Code for Conditional Application and Removal:

    Paste the following conceptual Velo code into your page's code panel (or a site-wide Velo file if you have multiple events using this logic). Replace 'YOUR_BOGO_COUPON_CODE' with the actual code of your 50% off coupon and 'YOUR_EVENT_ID' with the ID of your event. Remember to add a text element (e.g., #bogoMessage) on your page to display feedback to the user.

    // For full API documentation, visit: https://www.wix.com/velo/reference/api-overview
    
    import wixEvents from 'wix-events';
    import wixEventsBackend from 'wix-events-backend';
    
    const BOGO_COUP; // Replace with your actual coupon code
    const TARGET_EVENT_ID = 'YOUR_EVENT_ID'; // Replace with your event ID
    
    $w.onReady(function () {
        wixEvents.cart.onCartChanged(handleCartChange);
        
        // Optional: If you have a custom apply button
        // $w('#applyCouponButton').onClick(() => {
        //     applyBogoCoupon();
        // });
    });
    
    async function handleCartChange(cart) {
        let totalTickets = 0;
        let coup
    
        if (cart && cart.lineItems) {
            for (const item of cart.lineItems) {
                if (item.event && item.event._id === TARGET_EVENT_ID) {
                    totalTickets += item.quantity;
                }
                if (item.coup BOGO_COUPON_CODE) {
                    coup
                }
            }
        }
    
        if (totalTickets >= 2 && totalTickets % 2 === 0) { // Qualifies for 2-for-1 (even quantity >= 2)
            if (!couponApplied) {
                try {
                    await wixEvents.cart.applyCoupon(BOGO_COUPON_CODE);
                    console.log('BOGO coupon applied successfully.');
                    $w('#bogoMessage').text = 'Congratulations! 2-for-1 discount applied.';
                    $w('#bogoMessage').show();
                } catch (error) {
                    console.error('Error applying BOGO coupon:', error);
                    $w('#bogoMessage').text = 'Error applying discount. Please try again.';
                    $w('#bogoMessage').show();
                }
            }
        } else { // Does not qualify or quantity is odd
            if (couponApplied) {
                try {
                    await wixEvents.cart.removeCoupon(BOGO_COUPON_CODE);
                    console.log('BOGO coupon removed.');
                    $w('#bogoMessage').text = 'Discount removed. Add an even number of tickets (2 or more) to qualify for 2-for-1.';
                    $w('#bogoMessage').show();
                } catch (error) {
                    console.error('Error removing BOGO coupon:', error);
                    $w('#bogoMessage').text = 'Error removing discount. Please refresh.';
                    $w('#bogoMessage').show();
                }
            }
            if (!couponApplied) {
                 $w('#bogoMessage').text = 'Add an even number of tickets (2 or more) to qualify for 2-for-1.';
                 $w('#bogoMessage').show();
            }
        }
    }
    
    // If you had a custom apply button and input, you might use something like this:
    // async function applyBogoCoupon() {
    //     const inputCoup
    //     if (inputCoup BOGO_COUPON_CODE) {
    //         const cart = await wixEvents.cart.getCart();
    //         let totalTickets = 0;
    //         if (cart && cart.lineItems) {
    //             for (const item of cart.lineItems) {
    //                 if (item.event && item.event._id === TARGET_EVENT_ID) {
    //                     totalTickets += item.quantity;
    //                 }
    //             }
    //         }
    //         if (totalTickets >= 2 && totalTickets % 2 === 0) {
    //             try {
    //                 await wixEvents.cart.applyCoupon(BOGO_COUPON_CODE);
    //                 $w('#bogoMessage').text = 'Discount applied!';
    //                 $w('#bogoMessage').show();
    //             } catch (error) {
    //                 $w('#bogoMessage').text = 'Could not apply discount. Please check quantity.';
    //                 $w('#bogoMessage').show();
    //             }
    //         } else {
    //             $w('#bogoMessage').text = 'You need an even number of tickets (2 or more) to use this coupon.';
    //             $w('#bogoMessage').show();
    //         }
    //     } else {
    //         $w('#bogoMessage').text = 'Invalid coupon code or not applicable.';
    //         $w('#bogoMessage').show();
    //     }
    // }
    

    This code monitors the event cart. If an even number of tickets (2 or more) for the target event is detected, it attempts to apply your 50% off coupon. If the quantity changes to an odd number or falls below two, it removes the coupon, ensuring the discount logic remains consistent with a true "Buy X Get Y" offer.

Key Takeaways for Store Owners and Developers

The Wix Events "Buy X Get Y" challenge highlights a critical area for platform enhancement. While direct implementation remains elusive, developers can leverage Velo to create sophisticated workarounds that closely mimic the desired promotional logic. Key takeaways include:

  • Understand API Limitations: Be aware that Wix Events coupons are currently limited to percentOff and moneyOff, lacking advanced quantity-based conditions.
  • Advocate for Features: Actively vote on and contribute to existing feature requests in the Wix Help Center to signal demand for enhanced functionality.
  • Embrace Velo for Custom Solutions: For complex discounting scenarios not natively supported, Velo provides the flexibility to build custom logic, albeit with careful consideration for user experience and maintenance.
  • Clear Communication: Ensure your customers understand the terms of your promotions, especially when using custom solutions that might behave differently from standard coupon applications.

By understanding these constraints and employing creative Velo solutions, Wix Studio users can still offer compelling promotions, even as they await native platform enhancements.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools