Specific Group of User Meta Fields Assigned to WooCommerce Product on Order
Support › MB User Meta › Specific Group of User Meta Fields Assigned to WooCommerce Product on OrderResolved
- This topic has 5 replies, 2 voices, and was last updated 4 years ago by
Long Nguyen.
-
AuthorPosts
-
April 13, 2021 at 4:32 PM #27205
Masterplan AcadeME
ParticipantHi,
My business allows parents to book vacation camps and online tutoring for their kids via our website. Currently I have a custom plugin which allows the parents to create "profiles" for their children on their account page. The "profile" is however nothing more than a group of custom meta fields capturing data such as age, grade, allergies, etc.
Previously the custom plugin would then allow for the parent to "assign" a child to whichever product they are booking, e.g. if the parent has 2 kids they could assign Kid 1 to a booking for a camp and then Kid 2 to a booking for tutoring. This allows us as the business managers to have all the details about the specific kid easily on hand and the parent does not need to reenter the information each time they book.
Unfortunately that plugin developer can no longer support the plugin and it is has become problematic and buggy as other plugins have been updated. I therefore wish to use Meta Box for this purpose and wanted to check if it would be possible to be able to allow the user (parent) to assign a group of fields as described (i.e. a child) to a specific product upon checkout.
Thanks
April 13, 2021 at 9:52 PM #27214Long Nguyen
ModeratorHi there,
Thank you for using our plugin.
To assign group fields on the checkout page, I think it's not easy and need a lot of code. You can easier to create a group (cloneable) with subfields. Each cloneable is a child, use the field post to assign a post type (product) to a child. Then let the parent (user) update their childs by using MB User Meta.
Hope that helps.
April 14, 2021 at 4:09 AM #27221Masterplan AcadeME
ParticipantHi
Thank you for your quick reply and awesome support!
I have created the cloneable group and that works well. I am able to add the details via the admin panel for each user. I have also managed to enable this on the front end so that the user can update the details from their account page.
So far so good... but I am confused as to where I should "use the field post to assign a post type (product) to a child". Would this be on the single product page and if so how does one go about implementing that?
Thanks again!
April 14, 2021 at 12:23 PM #27225Long Nguyen
ModeratorHi,
The product will show on the user editing page, use it as a sub-field. See my screen record https://share.getcloudapp.com/5zuBdqzK.
April 14, 2021 at 9:15 PM #27244Masterplan AcadeME
ParticipantThank you! That certainly works as a short term solution, but from a customer experience point of view it is not really very good.
Can you tell me the options around getting some custom code written to achieve what I want to achieve? Is that something you do or should I just look for a general developer for this.
Many thanks!
April 15, 2021 at 9:12 AM #27258Long Nguyen
ModeratorHi,
For a simple case like that, I think you can just use the MB Builder to create the custom fields, assign them to the user, and let the user update their profile on the frontend by using the shortcode of MB User Profile https://docs.metabox.io/extensions/mb-user-profile/
For advanced cases and need to custom code, I think you might need a developer to create the code for you.
-
AuthorPosts
- You must be logged in to reply to this topic.