Search the Community
Showing results for tags 'options'.
-
I've been searching for a science that will solve this analysis problem. Since I don't know what I'm looking for, I cannot properly express the task to accomplish. I have an eCommerce store selling a product that has (let's keep it simple) three properties and each property can hold any one of three possible relevant values (or null). Combinations: 3^3=27 A typical combination would be round/solid/blue, or cubic/squishy/white. The task is to efficiently eliminate that part of the array if any particular {set of values} is null. That is, if I currently have no pink items, the relevant sections of the array would get eliminated. Product variations with low n-values is easy to manually handle. But with five and above, that's the math(?) theory I am trying to know the name of. (I wonder if any Matlab manuals would give a clue.) I am trying this elimination of sections of an established array instead of rebuilding the array every time a value is locked in. On the other hand, maybe I'm trying to be too smart about this and should just let the server do the grunt work over and over.
- 1 reply
-
- combinatorics
- array
-
(and 1 more)
Tagged with:
-
Hello, I am using a component for joomla 2.5 but i hit snag where it comes to selecting the categories from a drop down box in the front end. I want to use the disabled element for the top category options so that they are visible but unselectable. Something like this: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option_disabled The component uses the following code to hide certain categories of my choosing but i don't want to hide them i just want to add the HTML element "disabled" to the corresponding options: $options = JHTML::_('category.options','com_content',array('filter.published' => 1 )); require_once(JPATH_COMPONENT_SITE.DS.'config'.DS.'restrictions.php'); $myGroups = $acl->getGroupsByUser($my->id,false); foreach($myGroups as $gid) { if(isset($groupRestrictions[$gid])) { foreach($options as $k=>$option) { if(in_array( $option->value, $groupRestrictions[$gid] )) { unset($options[$k]); } } } } $opt = array('value'=>0,'text'=>JText::_('JOPTION_SELECT_CATEGORY')); array_unshift($options,$opt); return JHTML::_('select.genericlist',$options,'catid',"class='inputbox'",'value','text',$categoryId); } Any help is gratefully appreciated.
- 3 replies
-
- joomla 2.5
- form
-
(and 2 more)
Tagged with: