Skip Navigation

[Resolved] I need to sell multiple products in a single form

This support ticket is created 6 years, 10 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by Jean-Francois 6 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#605266

I've followed documentation at https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/, and specifically 2.1, which works fine, for the ability to sell *one* product on a Form (I've used a Select custom field, and the product_id as value).

But this new projet would require that I have the following capabilities in a single CRED form, ie :
- Product decision #1 will be a fee for 1 or multiple people (how can we determine quantity != 1 of a product ?)
- Product decision #2 will be a variation of a single product (can we specify a variation ?)
- Product decision #3 will be a yes/no choice if the client needs the product
- Product decision #4 will be yes/no + quantity for several different products (could be variations, or different products)

Right now, the CRED form only allows polling a single custom_field for a product choice... is there a way to make it so I can sell multiple products, like noted above?

In the end, I would need that all products/variations be added to cart, and for the workflow to continue from there.

Can this be done ? Or do I need to look at something like Gravity Forms to capture data, and output to my Types CPT ?

#605396

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Jean-Francois

The CRED Commerce workflow only expects a single product and can't handle adding multiple products to the cart.

The only thing I can suggest to add multiple products would be to use the cred_commerce_add_product_to_cart hook (https://toolset.com/documentation/programmer-reference/cred-commerce-api/#cred_commerce_add_product_to_cart) to manually add additional products using WooCommerce's own functions.

You can add a product to the cart with the following:

global $woocommerce;
$woocommerce->cart->add_to_cart($product_id);

There may be better ways, but you would need to consult the WooCommerce documentation.

I didn't follow exactly what you wanted from your question, but this is the only way I can think to modify the workflow to add multiple products.

#605490

Hi Nigel, tks for getting back to me so quick, albeit without a magical solution 😉

I see what I'm trying to do has been asked before in the forums :

- Multiple Products in one CRED form:
-- https://toolset.com/forums/topic/buy-more-then-1-product-with-cred-commerce/
-- https://toolset.com/forums/topic/add-the-option-to-add-multiple-products-to-cart-based-on-the-user-choice/
-- https://toolset.com/forums/topic/chargin-more-than-one-product-with-cred-commerce/
-- https://toolset.com/forums/topic/classifieds-multiple-products-using-same-cred-form/
-- https://toolset.com/forums/topic/multiple-paid-options-with-cred-commerce/
-- https://toolset.com/forums/topic/multiple-woo-commerce-products-in-cred-form-and-chck-out/

- Product Quantities :
-- https://toolset.com/forums/topic/define-product-quantity-within-cred-form/
-- https://toolset.com/forums/topic/define-product-quantity-within-cred-form-2/

- Product Variations :
-- https://toolset.com/forums/topic/how-do-i-add-my-woo-product-list-options-to-the-cred-form/

Are any of these items, but more importantly the "multiple products" on the developer's roadmap? It's not been asked a million times, but at the same time, it has been requested for a while, and it seems "interesting" to use the WooCommerce cart, but be limited to a single item in the cart... 😉

Thanks !

#605808

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I have passed on your requests (supported by the related forum links) and they are under consideration.

There is not much more I can tell you right now other than if they are accepted you shouldn't expect them to be added soon. As you are probably aware we have the major update to Types, Views, and CRED to improve post relationships and repeating field groups, and that is the main focus of current development efforts, aside from bug fixes.

#605846

Thank you, "consideration" by the dev team is all I can ask for, and I understand there's a priority funnel.

Cheers !