When “Allow multiple subscriptions .. to be purchased at the same time” is disabled in the WooCommerce Subscriptions settings, a customer is only able to add one subscription the cart at a time.
But, if subscriptions are part of a Grouped Product, the subscriptions are listed with checkboxes next to them for selection.
This is confusing for the customer, as it gives the impression that the customer can select multiple subscriptions, and yet when they are added to the cart only the last selected item remain in the cart. This is because the cart can only contain one subscription at a time, due to the setting mentioned above.
This is clearly a usability issue, which needs to be improved.
Therefore radio buttons should be displayed instead of checkboxes, which only allow the customer to select one subscription in the Grouped Product.
Please note: This only occurs when the subscription products are set as ‘Sold Individually’, otherwise quantity boxes are displayed beside the subscriptions options instead.
Open
Last updated: September 6, 2019
Log in to comment on this feature request.
Another vote for this. As an interim solution, I’ve got this JavaScript that can be included on the grouped product page via a hook if you pop this in a php file somewhere in a custom plugin or theme. This will prevent more than one tickbox from being checked at any one time, so will make the tickboxes behave like radio icons.
add_action( ‘woocommerce_after_single_product’, ‘after_single_product’, 5 );
public function after_single_product($params) {
global $product;
if ($product->get_type() != ‘grouped’) {
return;
}
?>
const GroupedProduct = {
activate: function() {
var elements = document.querySelectorAll(“.wc-grouped-product-add-to-cart-checkbox”);
elements.forEach(function(button) {
button.addEventListener(“click”, GroupedProduct.click);
});
},
click: function(evt) {
if (evt.target.checked == false) {
return;
}
var elements = document.querySelectorAll(“.wc-grouped-product-add-to-cart-checkbox”);
elements.forEach(function(button) {
if (button != evt.target) {
button.checked = false;
}
});
}
}
document.addEventListener(“DOMContentLoaded”, GroupedProduct.activate);
<?php
}
Yes this would be a very nice touch; it’s very confusing to users.
yes it is need
This seems obvious to me. It’s a very common use case that a business wants to offer subscriptions with multiple tiers. Setting this up as a grouped product allows the most flexibility (i.e. different rewards points per tier). But the checkboxes don’t make any sense if a user is only allowed to have a single subscription at any one time. Radio buttons make WAY more sense.
Umm, do we get any feedback on this? This is exactly the problem I’m just facing and looking for a solution; Don’t want edit template files.
You can do the following:
1. Instal code snippets plugin
2. create new code snippet and add following code:
add_action( ‘wp_head’, function () { ?>
Definitely need this! Radio buttons would make it much easier. At least provide it as an option so for memberships where only one product should be selected (such as a duration; monthly/annually) it stops confusion.
This is really needed?