martinN-3
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Cred Commerce from creating two orders and one of them as "guest"
Started by: martinN-3 in: Toolset Professional Support |
2 | 8 | 7 years, 3 months ago | ||
Store custom field value in $variable and return it
Started by: martinN-3 in: Toolset Professional Support |
2 | 2 | 7 years, 3 months ago | ||
Show product ID with link of bought product in cpt with cred commerce form
Started by: martinN-3 in: Toolset Professional Support |
2 | 8 | 7 years, 3 months ago | ||
Cred Commerce not adding product to form (woo subscription)
Started by: martinN-3
in: Toolset Professional Support
Problem: When I load the page containing my CRED Commerce form, it looks like a form to create a new Product. Nothing is added to my cart. Solution: CRED Commerce is designed to create a post, so if you select the Product post type the form will allow you to create a Product post. This is expected. If you do not want to create a new Product or standard Post, you can create a new custom post type specifically for this process. When the form is submitted, a new post will be created and the selected linked Product will be added to the user's cart. Relevant Documentation: https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/ |
2 | 9 | 7 years, 3 months ago | ||
Auto assign parent post to a childpost of a user (only one parent post per user)
Started by: martinN-3
in: Toolset Professional Support
Problem: I have a CRED form that is used to create Location posts, which are children of Business posts. There is a select field that allows a User to select a parent Business, but I want the options to be limited to show only Businesses created by the current User. Solution: Follow the guide here to create a child post link from the parent Business post. This will automatically set the parent Business ID for you. See "Displaying the Form" section at the documentation link below. Relevant Documentation: https://toolset.com/documentation/user-guides/cred-forms-for-child-content/ |
2 | 3 | 7 years, 3 months ago | ||
Cred form to lets me edit but doesnt show results
Started by: martinN-3
in: Toolset Professional Support
Problem: I have a CRED edit form that does not seem to work correctly. When I submit changes, the changes are not saved, and the page where the form is placed becomes a different post type. Solution: Make sure that the CRED form is placed inside the View showing the post you would like to edit. If you place it directly in the page content, you will end up editing the page instead of the post. |
2 | 7 | 7 years, 3 months ago | ||
Radio buttons selection triggers assigning to one of 2 user roles
Started by: martinN-3
in: Toolset Professional Support
Problem: I have a CRED form that creates new Users in a custom role with slug "kunde". I have defined two custom roles that I would like the User to be able to select from, and when the form is submitted I would like to change their role to the selected role. Solution: Use a generic field to allow the user to select a role. The value for each option should be the slug of your custom role. [cred_generic_field field='user_select_role' type='radio' class='zbrole' urlparam=''] { "required":1, "validate_format":0, "default":[], "options":[ {"value":"kunde_mit_zentralbelieferung","label":"Kunde mit Zentralbelieferung"}, {"value":"kunde_ohne_zentralbelieferung","label":"Kunde ohne Zentralbelieferung"} ] } [/cred_generic_field] Use cred_save_data to modify the User's role after the User is created: add_action('cred_save_data', 'cred_update_user_role_action',10,2); function cred_update_user_role_action($user_id, $form_data) { if ($form_data['id'] == 14) { // modify the user role to match the selected option $role = $_REQUEST['user_select_role']; $u = new WP_User( $user_id ); $u->remove_role( 'kunde' ); //cred form role setting $u->set_role( $role ); } } Relevant Documentation: |
2 | 14 | 7 years, 3 months ago | ||
Automatic post creation on registration
Started by: martinN-3
in: Toolset Professional Support
Problem: Solution: You can find the proposed solution with the reply at here and here. Relevant Documentation: |
2 | 13 | 7 years, 3 months ago | ||
Create a WooCommerce Shop where accounts can assign multiple subscriptions
Started by: martinN-3
in: Toolset Professional Support
Problem: I would like to create a site that allows Users to register. This registration process should create a Business post for each User. Once they are registered, the User should be able to add different Locations to their business. For each Location, the user should be able to purchase a subscription, which will be managed by WooCommerce Subscriptions. Solution: 2. When a user registers, automatically create a single Business for each User and make that User the author of the Business. 3. When a User logs in, send them directly to their Business single post page. On this page you should have a View showing all their Locations and a CRED form where they can create new Locations. 4. Once the User submits the CRED form and creates a Location, the Location View will update to include information about each Location. In each item of the View, include a link to a child CRED form that says something like "Purchase a Subscription for this Location". This will be the CRED Commerce form that selects an existing Product from your shop and adds it into the User's Cart. You can make it select the same Product every time, or you can allow the User to select their desired Product - like a shorter or longer subscription. 5. When the User completes payment, the Subscription post that is created by CRED will be updated. Typically this is set to change from a Pending or Draft post to a Published post. You can then set up conditional HTML that will display each published Subscription next to its parent Location in the View on the Business single post page, instead of the link to create a new child Subscription. 6. What happens after this is not quite as clear to me, because much of it depends on how WC Subscriptions manages subscription expiration and renewal. It seems like you need to know when a subscription in WC Subscriptions expires, or is cancelled manually, in order to update the Subscription post created by CRED. If they offer action hooks, you can automatically change the Subscription post status back to Pending or Draft, which will remove it from the Locations View on the Business page. It will be replaced by the "Purchase Subscription" link. If you are able to find the appropriate hook, I can help you implement the status change in PHP, but I'm not really qualified to help you find the right hook or to know how WC Subscriptions works. Relevant Documentation: |
2 | 7 | 7 years, 3 months ago | ||
Creating a guestlist with manually added users and questions for the users
Started by: martinN-3 in: Toolset Professional Support |
2 | 2 | 7 years, 4 months ago |