How to set Woocommerce Memberships discount OR coupon code to allow for a single freebie of every product? - woocommerce

I am using Woocommerce Memberships. We sell tickets to festival events. One of the perks of a specific level of membership is that you get 1 free to ticket to every event on offer. So if I had only three events (A, B & C), my members would be allowed 1 freebie ticket for each of the three but could purchase as many others as they like at the regular price.
I am not sure how to set this up either as a membership discount or a coupon...either would be fine. I would very much prefer not to have to make both free and paid versions of each event for simplicity, sanity, and recordkeeping purposes. Because they can buy multiples of each ticket, I can't set the price at Zero and limit them to one of each event.
Let's say each event cost $10. A fixed cart discount of $30 won't work, as they can only get 1 free ticket to each of the three events, and $30 off would allow 3 free entries to a single event. Nor can I limit their purchase of the events to 1 each with a cost of zero, as most will want to buy additional full price tickets to each event.
I might be overthinking things, but if anybody has a suggestion on how best to go about this, please share.

Related

WooCommerce Flexible Checkout Fields Price Change

I'm using Flexible Checkout Fields plugin with wooCommerce. I have a select field where the user selects a number of attendees and 1, 2, or 3 team players. Each player option has a price. IF the user has a membership I want to override the player price and set it to 0. I was trying to do this with FCF Field validation with no luck. If you're wondering, the product in question has a base price everyone is charged, so using membership discounts won't work in the product. I thought about changing it to a variable product, but that started getting really messy as a user may have 3 attending, but only 1 or 2 playing. The simplest approach seemed to be just to validate the player fee based on membership and number chosen.
FCF validation number filter.

Advice on A/B testing price?

Just wondering how do you go about A/B testing price on an e-commerce site using WooCommerce? I have used 2 methods both with drawbacks. Was wondering what alternatives you guys have.
Method 1:
If I use Google Optimize, I am able to change the price a user sees.
Original: Price on page = $10
Variant 1: Price on page = $20
Problem with Method 1:
However, even if I edit the page to show $20 when a user clicks Add to Cart, they would still add the $10 version of the product. Clearly, this is not ideal for testing purposes since I want to see how many users actually checked out at the $20 price point.
Method 2:
Have different landing pages that show different products. Using my e-commerce plugin (WooCommerce), I can then add different prices for the same product (ie. add the same product twice just that they have different prices). This way the price a user sees is actually what is added to their cart.
Original (on www.homepage.com): Price on page = $10
Variant 1 (on www.homepage.com/variant1): Price on page = $20
Problem with Method 2:
A user who lands on the $20 page can easily go back to the homepage ( to find that they are actually being charged more). This sounds like it would lead to negative customer experience.
Question:
Which method is better and how do you mitigate the problems they pose? Or are there better ways of dealing with this?
Thanks!

Fixed Dates for WooCommerce Subscription

Is it possible to start and expire subscriptions at WooCommerce Subscription at a fixed time?
For an initiative of a university, I develop a page that should allow payments for semester contributions. There are fixed start and end dates (semester start and end). Buyers then acquire membership in the initiative for the semester. This should work well with WooCommerce memberships, where you can use fixed start and end dates. However, it is counterproductive that WooCommerce Subscriptions can not do the same. If someone buys a subscription towards the end of the semester he/she is a member over both semesters. In addition, the reminders of the extensions arrive on different days. The synchronization of payments is also not a solution, as this allows only intervals.
I have thought about the alternative, to let members purchase a simple product (no subscription, since this must be renewed manually anyway). However, I have the problem that members could acquire several before their membership has expired. I also do not know how Memberships behaves when it expires. Do users have to buy the product again or does Memberships still think the product has been bought?

Aggregate events / goals per user

I would like to know if there's a way to display information based on how many (similar) goals or events were triggered by a unique user.
For instance, let's say I own amazon. For every product I sell, I trigger a 'Purchase' goal (by using an event).
I would like to know:
How many products does an average user buy, in multiple sessions, over a time span. for instance, how many products did an average user buy in the span of a month.
I would like to segment data by the amount of products bought by users. i.e. segmenting my data based on users that bought 0 products, 1-5 products, 6-10, products, and 11+ products.
Is there a way to do so?
You have to get custom dimension/metric in GA. Add a custom dimension 'product_quantity' and get actual number of products bought as metric value in the variable.
Once you get have it, you do calculation of total products divided by users or creating segments based on product_quantity dimension.
Find more info at https://support.google.com/analytics/answer/2709828?hl=en
It is easier with Google Tag Manager. Once you define custom dimension/metric, trigger may be completion of 'Purchase' goal or any event.

Additional payment on top of defined Plan in Stripe using asp.net

On Stripe is there any API where customer can pay additional charges along with the Plan amount within single transaction ?
Scenario is, total amount of charge is based on number of users. Means say 1 user has $100 need to charged and base plan amount is of $3000. While purchasing the license customer has to define number of users, say 5 (So 5*100=500) + 3000 (base plan amount) So total should be $3500 should pay within single transaction. number of users may varies. So how to code for Stripe for this scenario.
First, you would create your $100 plan and set the quantity depending on the number of users your customer currently has so that with a quantity of 5 he ends up paying $500. You can update the quantity and let Stripe handle the proration.
You would then use Invoice Items to change the amount you want to charge your customer on each billing cycle. Invoice items get added automatically to the customer's next invoice so that you could charge $3000 + $500 for example.
You would then have to use Stripe's webhooks to be notified about events that happen in your Stripe account. That way you can listen for the invoice.created event and create an invoice item for this invoice to change the amount billed to this customer.
In the end, here are the steps you'd follow:
Create a customer in Stripe with the card token.
Create the first $3000 Invoice Item for the first invoice since that one is always closed by default.
Create the subscription to the $100 monthly plan with the expected quantity. This will automatically bill the Invoice Item created before.
Each month, listen for the invoice.created event and create a new Invoice Item for $3000.
Another solution which some people find easier to build would be to use the quantity parameter of the subscription to charge a different amount to each customer. You would create a $1 monthly plan for example and set the quantity to 3100 for customers who pay only for one user ($3100) or 3500 for the ones with 5 users ($3500). This is also detailed in the subscriptions guide.

Resources