Product attributes

PC
Forums
Hello Opigno, We would like to sell courses (classes actually) in several locations. So the same class will take place in different locations. Instead of selling 20 times the same class except for the location, we would like the buyer to be able to choose it's location as an attribute, before subscribing. Is it possible ?
Profile picture for user James Aparicio
James Aparicio

Hi Pc,

Hi Pc,

So, you have 20 different classes? Is that it?

 

Best regards

PC

If we sell one class per

Hello James, If we sell one class per location, we will have many many more. We want to avoid duplicating classes, if possible
Profile picture for user James Aparicio
James Aparicio

Hi Pc,

Hi Pc,

Yes, this is possible ofc.

Look at the opigno_user_expiration_app. This module creates a membership field. This is what you want to do. Create the location as a vocabolary and add it to the membership.

Best regards

PC

Hello James

Thanks for your answer, but i don't quite understand it. Do you mean i have to use tis hook : hook_og_membership_insert($og_membership) ? If so what will be the result ?
Profile picture for user James Aparicio
James Aparicio

The result will be that

The result will be that inside a group, you will be able to distinguish the users that are part of location x and location y.

When someone clicks on subscribe the field shows up for them to fill. Regarding the commerce, you add the field to the checkout as a required field, and you edit our commerce rule "rules_activate_bought_og_membership" to get that information from the order and set it on the membership of the person who bought the product.

Best regards