ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
This is how they are ordered:
<select name="id[3]" onchange="i3(this.form);">
<option value="0" selected="selected">Next select colour</option>
<option value="18">Black </option>
<option value="21">dark green </option>
<option value="272">Red </option>
<option value="367">damson </option>
<option value="370">natural white </option>
</select>
as you can see, ordered numerically by attribute option value
they should be ordered as per:
![]()
That's the sequence my browser presents and how I see it... Sorry can't take a screen capture... Try a dfferent browser or something, as the issue makes little sense unless they were originally filtered in that order, the page loaded, the order changed, and the page "reloaded"... When dealing with attributes, not clearing the cache/session can cause changes to not appear.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Here are 3 screen grabs, one for firefox, one for ie, one for chrome, all the incorrect order:
Chrome
firefox
internet explorer
they all list the colours numerically, which is incorrect:
Black
dark green
Red
damson
natural white
i would like them to be ordered as i have set them up in attributes controller:
natural white
Black
damson
Red
dark green
P.S.
The client also sees the incorrect order, so, not just me.
Here is the source code that I see whch produces the desired order as expected:
The mportant part being the sequence ofthe sub groups of stk.Code:<tr><td align="right" class="main"><b>colour:</b></td><td class="main"><select name="id[3]" onchange="i3(this.form);"> <option value="0" selected="selected">Next select colour</option> </select> </td></tr> <tr><td> </td><td><span id="oosmsg" class="errorBox"></span> <tr><td colspan="2"> <script type="text/javascript" language="javascript"><!-- var stk={1:{370:1,18:1,367:1,272:1,21:1},2:{370:1,18:1,367:1,272:1,21:1},3:{370:1,18:1,367:1,272:1,21:1}}; var stk2={1:{370:1,18:1,367:1,272:1,21:1},2:{370:1,18:1,367:1,272:1,21:1},3:{370:1,18:1,367:1,272:1,21:1}}; var txt3={370:'natural white ',18:'Black ',367:'damson ',272:'Red ',21:'dark green '}; function i1(frm) { var displayshown = false; var span=document.getElementById("oosmsg"); while (span.childNodes[0]) { span.removeChild(span.childNodes[0]); } frm['id[3]'].length=1; for (opt in stk[frm['id[1]'].value]) { if (typeof stk2[frm['id[1]'].value] != "undefined") { if (typeof stk2[frm['id[1]'].value][opt] != "undefined") { frm['id[3]'].options[frm['id[3]'].length]=new Option(txt3[opt],opt); } else { frm['id[3]'].options[frm['id[3]'].length]=new Option(txt3[opt] + '- Unavailable ',opt); } } else { frm['id[3]'].options[frm['id[3]'].length]=new Option(txt3[opt] + '- Unavailable ',opt); if (displayshown != true) { alert('All selections of the attributes below this one are Out of Stock. Please select a different option.'); stkmsg(frm); displayshown=true; } } }
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Also, may want to correct the validation issues with that page (and likely other product pages).
Further, may want to try turning off the Dynamic Dropdown part and see if the same result or different. May have sme sort of Javascript conflict not appearing on my device.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I can see that the code looks like it should be working, but it would be great if you could provide a screen grab of it working as a drop down, can you sort this please?
the javascript code above appears after the drop downs, i wander whether this is why the sort order isnt working??
i plumped for deactivating dynamic drop downs, all seems to be working now
matt
actually, deactivating dynamic drop down creates to many issues, so am reactivating, will investigate why javascript order not being displayed
matt
Bookmarks