The problem is that right now, for each product that has variations, you have to manually selected a product then the dimensions and then the SKU when realistically, once you select the product there is only one option showing in dimensions and one option in the product code (SKU) so these should really manually be selected upon selecting which product you would like
e.g.
Product Name
1 Door Nest of 1 - 305mm deep
1 Door Nest of 2 - 305mm deep
Dimension
(H) 1974 x (W) 305 x (D) 305mm
(H) 1974 x (W) 610 x (D) 305mm
Code / SKU
L/305/1/1
L/305/1/2
Now, if you select the first option then it looks like this
Product Name
1 Door Nest of 1 - 305mm deep
Dimension
(H) 1974 x (W) 305 x (D) 305mm
Code / SKU
L/305/1/1
i.e. it only shows the dimension and sku relating to that product, which is great but I'd like it to automatically select those options and then give the user the price.
I have tried to un-select the option 'Visible on the product page' for the options I don't require to be visible to the user (though they still show and it did nothing)
I have also tried to use javascript to select the second option as there is always a 'Choose option' and then the actual option, but this only seems to work for whichever product I select that the number is set to in this case 2, product 2 would work and none of the others would.
$('select[name="attribute_name"]').on('change', function() {
$('select[name="attribute_dimensions"] option:eq(2)').attr('selected', 'selected');
$('select[name="attribute_product-code"] option:eq(2)').attr('selected', 'selected');
});
I unfortunately don't have any code, it's just the standard WooCommerce plugin as it stands, no custom PHP code.
I would expect when I click a product, and the options have filtered to the selection to just automatically select the remaining two options as detailed above.