So, after a lot of hunting in your code, I managed to make the component show all the items that contain the specific size, regardless if they have other sizes in their db field or not.
The code is in com_datafeeds/helpers/helpers.php, at the very end of th file there is the function df_select which among others has
$t= $db->Quote($s);
if ($not === false ) {
return "`$f` = $t";
} else {
return "`$f` not in ('',$t)";
}
Since I want to apply this functionality to only 1 of my fields (db Select12 mapped to menu 7), I changed the above code part to
if ( $f == 'Select12' ) {
$s = '%'.$s.'%';
$t= $db->Quote($s);
if ($not === false ) {
return "`$f` LIKE $t";
} else {
return "`$f` not in ('',$t)";
}
}
else{
$t= $db->Quote($s);
if ($not === false ) {
return "`$f` = $t";
} else {
return "`$f` not in ('',$t)";
}
}
As for the module, I have made A LOT of customizations and I have it display the individual sizes only, however the module needs a lot more tweaking to be as optimized as possible. My main concern with the module is that I'm applying a series of for statements to get the individual values, remove duplicates, sort them etc and when this fors happen over a few thousand items, php might take a while to compute. At first I used array_unique to remove duplicates but after a bit of reading and testing I realized it's gonna be awfully slow for a few thousands of items each containing 1-10 size values, so I removed the array_unique and added a foreach statement which seems to be 20x faster. Anyway, as I said the module needs some more work.
So
1. What do you think of my changes to the helpers.php file of the component? ANY input from you is welcome
2. If you have any code snippet that could perhaps help me with the module, any ideas, anything at all, I'm really looking forward to hearing it.
Bottom line is I'd feel a lot more comfortable to have the opinion of the component's maker when I'm making such fundamental changes to his code, your code.
Please tell me what you think