TOPIC:

Resource booking based on user subscription. 2 months 6 days ago #245111

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 799
Hi,

the code above is for the actual checkout.
What it does is adding an additional product (which could be a yoga class, the "$add_id" part) alongside the main product into the cart.

It does not track anything later on after purchase but a product by itself can have a duration in the product settings (verification days).

Number 3. should be covered, because a new yoga class would be added alongside purchasing the main product.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Resource booking based on user subscription. 2 months 6 days ago #245120

  • Topic Author
  • snappysites
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 39
  • Thanks: 0
So, let me see if I understand:

The customer purchases a membership and, during checkout, they also add their free yoga class bookings to the cart, correct?
Which means, for instance, if a customer purchases a 12 month membership which entitles them to 12 free yoga sessions, they must decide upfront exactly when, over the course of their 12 month membership, they intend attending their yoga sessions?

Please Log in or Create an account to join the conversation.

Resource booking based on user subscription. 2 months 5 days ago #245257

  • Topic Author
  • snappysites
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 39
  • Thanks: 0
Hi, Markus.

Anything?

Please Log in or Create an account to join the conversation.

Resource booking based on user subscription. 2 months 5 days ago #245259

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 799
Hi,

it depends on what you need there. So yes, it basically would be an upfront selection of the duration of memberships.

If a membership includes 12 yoga sessions, you could add 12 yoga session products in your product portfolio (with price = 0). Each having a validation offset in days from each other (the example adds one product (=1 session) but you can expand it to add as many products you want).

Example: Session 1 expires after 30 days, Session 2 expires after 60 days, the 12th expires after 365 days.

It sounds like a hack but it actually isn't when you think about it because this way, you have it covered correctly and each yoga session is an actual product.

The only thing that could look annoying is to have 13 products in the cart but you could title the yoga sessions like "1st Yoga Session", "2nd Yoga Session" and so on.

The big question when doing something like this is if you really need an expiration, in technical terms.
Ususally, you would use the built-in expirations like in my example for these items if they depend on accessing something on your site.

But if you just need the info "X yoga sessions included" without any further technical impact, a plain BF form where you can choose the membership duration would be enough. It would still work similar but instead of adding products, it would populate an input with information being displayed in the cart and order screen.

So yes, my example was basically the "bazooka" for this requirement.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.

Resource booking based on user subscription. 2 months 4 days ago #245339

  • Topic Author
  • snappysites
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 39
  • Thanks: 0
I feel this really limits user choice, not to mention many of the people who do yoga are the free-spirited, new age types who generally don't know what they're gonna be doing next week, let alone in 11 months time :lol:

How about this:

1. The 4 membership products (30, 90, 180 & 365 days) are hidden (I can do this with Regular Labs' Conditional Content plugin) & I require the customer to register and be logged in BEFORE purchasing a membership.

2. The membership product is integrated with a BF form (let's name that form 'members') with hidden fields which are auto-populated with the current date (named commencement_date) & user_id. Under the "Parameters - Advanced" tab in the product settings, "Verification Days" are either 30, 90, 180, and 365, and "Verification Groups" are either Members30, Members90, Members180 or Members365.

3. For ordering the free lessons, since no price is necessary, I can then create a simple order form in BF (also conditionally only visible to logged in users who belong to the above-mentioned user groups).

4. So, I would then need a Before Form Piece which conditionally displays the free lessons order form by
a) first getting the user_id and associated commencement_date (most recent date in case this is not their first membership) from the 'members' database table mentioned in point 2 above,
b) then checks to see if the user belongs to one of the afore-mentioned user groups
c) then adds 30, 90, 180 or 365 to the commencement date to check whether the membership is current.
d) Assuming all the above conditions are satisfied, the form is displayed, or the user sees a message such as "Unfortunately your membership expired on xxxx"
e) form submissions are limited to 1, 3, 6, or 12 based, again, on the user's group.

Please Log in or Create an account to join the conversation.

Last edit: Post by snappysites.

Resource booking based on user subscription. 2 months 3 days ago #245389

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 799
Ok, that's possible, too of course but since I don't have your current setup it will be hard to test for me.
I can add a few snippets right on your site if you want.

Please Log in or Create an account to join the conversation.

Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!