I need to set the selected option in a Variation product from a clic on a span.. I guess there's ajax somewhere because when you make a normal selection from the dropdown.. there's some infos showing up (remaining sotck and Variation description)..
I'm able to chage the selected option with the clic with this..
function setSelectedSection(i)
{
s = document.getElementById("sections"),
s.options[i-1].selected = true;
return;
}
Where i is the index ..
How can i "trigger" the call to show the Add to Cart button and the Remaining stock/Variation description.
The html code is..
<span id="s2" onClick="setSelectedSection(3)" class="stock-qte"></span>
<span id="s3" onClick="setSelectedSection(4)" class="stock-qte"></span>
etc.. as i have 12 cliquable "zone". Thanks!