Skip Navigation

[Résolu] Different product on user registration form

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

The issue here is that the user wanted to charge for forms but wanted the customer to determine the product package they want by using the form option "The form specifies the product according to the value of this custom field" but this wasn't working.

Solution:

Under normal circumstances this would work when you're using a Post form, however this user was try to do it with a user form.

This option only works for Post forms.

https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/#2-1-product-to-buy

This support ticket is created Il y a 6 années et 3 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Ce sujet contient 7 réponses, a 2 voix.

Dernière mise à jour par FrancoisJ6057 Il y a 6 années et 3 mois.

Assisté par: Shane.

Auteur
Publications
#1076427

Hi,

I'm trying to build a membership site, with two membership level. Each one have a different cost.
So I created two WooCommerce products, for each membership.

Then, I've created my user registration from. But, when I try to choose the " The form specifies the product according to the value of this custom field: " option, nothing shows. I've tried to add a select or radio button in the form, with products id as values, but nothing changes...

I've came accross doc and posts about this, but I not sure what to do. I've tried to created a custom field then attribuate it to Products, but it's not working either...
https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/#2-1-product-to-buy
https://toolset.com/forums/topic/im-not-able-to-select-diferent-products-on-user-form/
https://toolset.com/forums/topic/cred-documentation-clarification/

Thanks in advance!

#1076466

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Francois,

What you can do is to add a Toolset Forms generic Select field to the form.

Now for the value of each item in the select field you need to add the ID of the product. This should resolve the issue for you.

Thanks,
Shane

#1076478
Edit User Form ‹ Mentorat Québec — WordPress.png
Sans titre-1.jpg

Hi Shane,

I've tried, but still got the same results (no custom fields to chose from)...

#1076491

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Francois,

Could you add this to the generic field.

'persist':1,

Then re-save the form.

Thanks,
Shane

#1076501

Like that :

[cred_generic_field field='post-id' type='select' class='' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[
{"value":"421","label":"regulier"},
{"value":"423","label":"etudiant"}
]
}
[/cred_generic_field]

If so, it doesn't work. Also tried 'persist':1, but same results...

#1076514

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Francois,

Yes this is correct.

However would you mind allowing me to have access to the site so that I can have a better look ?

Thanks,
Shane

#1076537

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Francois,

I see the approach you are taking however the recommended approach on how to do this can be seen below.
https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/

You're using a user form and I don't believe that this setting works for user forms as a user role or membership is defined by the role set on the form.

So you will need different forms for each membership role.

Thanks,
Shane

#1077608

Thanks Shane!