I'm new in Magento 2 frontend development (and in development in general) and I am really lost at it, it's being hard to get arround some concepts, so I would like to ask for help in some specific things. I was asked to add the following functionality to my store:
Whenever someone enters a configurable product, the first option should be selected. That I achieved it with the help of this post: Magento 2: How to set default option in configurable options?
When someone in my store changes an options, the following ones have to update to the first option possible in the dropdown. I tried this post to achieve that: Magento 2: How to Keep Next Options value selected while changing previous option value on configurable dropdown
But, with this solution, I get the following result:
When I first enter the product, everything works fine
But, when I change the option of the first attribute, what Magento 2 is trying to do is to select the same option it was selected before. That is not available, so the option puts itself blank and the following options do not update with the desired options. I'm really stuck in this, and this doesn't seem to have been asked before, as I have been reserching since yesterday with no luck. Can someone help me with this, please?