Automattic / camptix

Moved to https://github.com/WordPress/wordcamp.org/
177 stars 97 forks source link

Discount is Being Applied to EVERY Ticket on Order, rather than Total Order Price #208

Open travispflanz opened 6 years ago

travispflanz commented 6 years ago

I use Camptix for WordCamp KC (as do all WordCamps, obviously).

I think this may be a bug, but it it's not I think it would be best to rework the function.

Coupons have two options: dollar amount discount and percent discount.

When someone places an order and uses a coupon, the discount is applied to each ticket on the order, instead of the order total.

The problem arises when a WordCamp volunteer and/or speaker purchases tickets for their entire office or coworkers. The speaker/volunteer would get a free ticket, but the rest of the office should not.

We create a coupon code for $40 off, making the ticket free - however, when the speaker purchases tickets, $40 is taken off of each ticket in the order, making the entire order free.

I believe this would function better if the coupon code was a discount on the entire order price, rather than a discount on each individual ticket within the order.

As it currently functions, it is a pain to make sure anyone who uses a discount knows that they mush make a separate purchase for any non-discounted tickets.

It all goes back to the philosophy of not making it difficult for customers (attendees in this case) to give you their money.

coreymckrill commented 6 years ago

@travispflanz Thanks for the report. I think you're right that this is probably a bug, because it seems unlikely that the intention was for a coupon code to apply to every ticket in an order of multiple tickets.

shantanu2704 commented 6 years ago

Hey @travispflanz -

I was thinking of picking up this issue. Correct me if I am wrong, but if the discount is set by percentage instead of dollar amount, and the discount is applied to the entire order, that would make the entire order free.

What I think needs to be done is instead of applying the coupon code to every ticket, it should be applied to only one ticket per order. What do you think?

Thanks!

/cc @coreymckrill

shantanu2704 commented 6 years ago

Hey @coreymckrill!

So I have been thinking about what you said regarding UI changes and I think me might have to some more info to the current line that describes the applied coupon.

Now - Coupon Applied: Coupon-Name, discount-value% discount ( For discount in percent ) Coupon Applied: Coupon-Name, $disocunt-value discount ( For discount in $ value )

We could change this to -
Coupon Applied: Coupon-Name, discount-value% discount on one Ticket Name ticket ( For discount in percent ) Coupon Applied: Coupon-Name, $disocunt-value discount on one Ticket Name ticket( For discount in $ value )

Other than that I don't think we need any more visual changes.

/cc @travispflanz

travispflanz commented 6 years ago

@shantanu2704

Thanks for picking this up!

I think the best application would be that the coupon is for applies to the entire order - not each individual ticket in the order.

So, if a 100% off coupon was created, that would give the entire order free, but if there's a coupon for $40 off, that would take $40 off the entire order (in my scenario above, this would mean 1 free ticket).

How it currently works is that the $40 discount is applied to each individual ticket in the order. This means that an order with 4 tickets would have $40 taken off each ticket, making each ticket free with a total due $0. The expected outcome for 4 tickets would be $120 due, because one ticket would be free.

I think your suggested change could cause even more confusion, because if an organizer wanted to give a coupon that encompassed multiple tickets, it probably wouldn't work. For example, at WordCamp KC, we've considered giving speakers an option of one free ticket or 50% off their entire order if they purchase multiple tickets.

/cc @coreymckrill

shantanu2704 commented 6 years ago

Hey @travispflanz!

So here's what I understand -

  1. If the coupon uses the discount percent option, the coupon should be applied per ticket.
  2. If the coupon uses the discount amount option, the coupon should be applied for the entire order.

If we decide on this approach I'll update the readme file to reflect the change in the coupon behavior so the organizers will be careful when they create any coupons.

Do you think this will affect any of the existing use cases?

Thanks!

/cc @coreymckrill

travispflanz commented 6 years ago

@shantanu2704

No. I think it is best if both types of coupons are applied to the entire order (though, a % discount per ticket would also pertain to the whole order)

I suppose an even better solution is to add a radio selection option for each coupon code created

/cc @coreymckrill

coreymckrill commented 6 years ago

Here's a technical detail to take into account. When a ticket transaction occurs, with or without a coupon code, an Attendee post is created in the database. Two of the post's postmeta values are tix_ticket_price and tix_ticket_discounted_price. (There's also tix_order_total). Without a coupon code, tix_ticket_price and tix_ticket_discounted_price have the same value. When a coupon code discounts the price, the tix_ticket_discounted_price value is lower, reflecting the actual price paid for the ticket. These numbers are used in various places in the CampTix plugin, but also externally to calculate the gross and net ticket revenue for a camp.

So even if we are showing on the front end that a coupon discount is applied to an entire order, behind the scenes it still needs to be applied to a specific ticket or to each ticket (depending on the context).

I'm also hesitant to add more configuration options to coupons, because I think that would just make things harder for both sellers and buyers to understand. So here's what I would recommend:

Make sense @travispflanz @shantanu2704 ?

EliW commented 5 years ago

FWIW, I do think that if this augmentation is added, there needs to be a fair bit of config around it. As there are different options I myself could see wanting to use: IE:

  1. flat discount off entire order: Save 20% if you buy now!
  2. flat $$$ off entire order: Have $50 off, don't care what ticket you buy.
  3. discount % on certain items: Save 20% if you buy now, these items only. Honestly, I'm not sure if 1 & 3 are ever different here. Cause it does what you'd expect either way.
  4. flat $$$ off certain items (per item): All tickets are $5 off today

So really, 1, 3, 4 are already handled. It's really just 2 that isn't by camptix. You can sometimes get a workaround by making a 1-time coupon, but that's not always useful.

I'll also add that 1 is currently annoying if you happen to add tickets later. Go make a dozen coupons for different UGs. Then decide to add a new ticket type. Now you have to go back into each of those coupons and add the new ticket type to them. Having a way to make a '10% off your cart, no matter what' type coupon, would be awesome for that.

And yeah, this is where most things get complicated for these type systems. :-/ -- But I could definitely see a benefit personally in having a way to make a 'per checkout' style coupon. However, it needed to be included in the back-end.

However I might suggest, instead of randomly picking 'Ticket 1' to apply any 'per cart' discount ... That instead you just make it go across them all. That's how other systems I've used in the past handled those. So make a 10% off cart coupon and have two $40 tickets. Each get listed as $36. Make a $10 off cart coupon and have two $40 tickets. Each get listed as $35.

So that seems to be the 'standard'.