My product selector isn't working properly for both my color variants and size variants

Not sure if my variants are set up properly, but my product selector is not changing when it is clicked on in my store. It is just putting in the default. Assuming my theme isn’t allowing both a color and size. Here is the code for my product selector

{% if product.variants.size == 1 or product.has_only_default_variant %}
  
{% else %}
  
{% endif %}

Hi GRIPTIGHT,

The code for the dropdown looks functional - if the dropdown is showing but not changing the product when selected, it’s possible there’s JavaScript on your theme that’s interfering with or overriding the default behavior. Check any scripts on the Liquid file where this code is appearing on, or theme-specific JavaScript files or third-party apps that might be affecting product pages.

Other thing could be that the code you posted filters variants to only show those that are available (where: 'available', true). If a variant is out of stock or not available, it won’t appear in the dropdown, so ensure that the variants you expect to see are indeed marked as available.

Hope this helps!