it's quite simple.
you say:
$ATC_itemDimmable = "".$row_rsDIMMLOOKUP['LEDprodvarname'] ."";// column binding
I have already demonstrated that this is not correct through the var_dump of the sensor recordset.
I further demonstrated that is not correct by pointing out that you have the same problem with the dimmable option:
https://www.ledwarehouseuk.com/LED-Lights-Bulbs.php?lbid=333
select None-Dimmable and the cart shows Dimmable.
I go on to further demonstrate that the column you are trying to get the option name out of, you are using in the recordset as the Option group:
rsCOLOURLOOKUP:
WHERE LEDprodvars.LEDprodvarname = 'Colour'
rsSENSORLOOKUP:
WHERE LEDprodvars.LEDprodvarname = 'Sensor'
I dont have the dimmable recordset in front of me for reference, but I bet the where clause would start
WHERE LEDprodvars.LEDprodvarname = 'Dimmable'
on one hand, you ask for my advice, but on the other hand you argue that the advice already given , and backed up with facts, is not correct.
I have already advised you to use the LEDvarname to get the option name into the cart, based on the var dump of the recordset that shows that is the column that contains the variable value you want:
array(5) { ["LEDprodoptionincr"]=> string(4) "0.00" ["LEDprodoptionsID"]=> string(3) "127" ["LEDvarname"]=> string(9) "No Sensor" ["LEDprodvarID"]=> string(1) "4" ["LEDprodvarname"]=> string(6) "Sensor" }
your argument that you are using the LEDprodvarname column for the sensor because you are also using it for the dimmable option does not make sense, because the dimmable option has the same problem.
Yes, the LEDvarname is the column that contains the option name
yes, they should, the dimmable option should also use the LEDvarname coluimn because that is the column that contains the option name.
I should not need to spell that out since the dimmable option is also displaying exactly the same problem. . .