WooCommerce - Allow only one variation of a product in cart?!

Hi,

I´m offering images in different resolutions and I need WooCommerce to allow only one variation of a product to be added to the cart. I enabled “Sold individually - Enable this to only allow one of this item to be bought in a single order” but this seems to be based on the SKU?! But on a variable product every variation has it´s own SKU and this means it´s possible to add all variations of one image to the cart.

Example: I have variable products like this
image_01
image_01_size1
image_01_size2
image_01_size3
image_02
image_02_size1
image_02_size2
image_02_size3

But now the customer can add all three size variations to the cart, which I don´ t want.

Is there a way to allow only one variation of a product to be added to the cart?
I thought maybe with extending the SKU-restriction to something like this:
SKU: image_01_* instead of image_01_size1

Thanks in advance :slight_smile:

Hi @cgmel,

Unfortunately, this is a customization request of the Woocommerce plugin which is outside of our support scope. Our theme does not have any effect of the add to cart functionality.

Our theme does change the view of the cart, or we have the Cart element in Pro header builder, but those are all front end view of the cart feature. The actual functionality of add to cart is done by Woocommerce plugin.

I performed a Google Search that might help you to start your research about the customization.

Thank you.

Based on your google-search I was able to find this nifty little plugin, which does exactly what I was looking for!

Thanks a lot for pointing me into the right direction :smiley:

Glad that we could be of a help :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.