My store is built on a collection of configurable products. Some have many size options but only one colour. I have noticed people have been selecting the size and adding to cart and not realising they have to select the colour option (because there is only one)
My question is, is there any way to automatically select an attribute on the product page, for example… automatically select the first attribute of colour as people are finding it hard to make a purchase and not noticing it is a required field.
Best Answer
Copy
js/configurableswatches/swatches-product.js
into your theme and change
selectFirstOption
totrue on line 107
,or
extend Product.ConfigurableSwatches._O.Product.selectFirstOption