Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display only entered attribute combinations
When displaying product using Dynamic Dropdowns, the option to display out-of-stock attributes previously displayed every attribute combination that could exist as determined by variations off of the attributes controller data. This could mean that the store owner may have entered a product that only had two variants, but the attributes would support three or more and dynamic dropdowns would display every such variation. But, with this modification, now only the variations that have been defined by the store owner will be displayed when displaying out-of-stock attributes. If it *is* desired to show every potential combination, then in the new code: ````php if ($productAttrAreSBA !== false && (true /* <- true to only display product variants available as entered, false to display every attribute combination possible from the attributes controller data for that product */ ? !is_null($productAttrAreSBA) : true)) { $combinations[] = array('comb'=>$newcomb, 'id'=>substr($newid,1), 'text'=>$newtext); if ($newisselected) { $selected_combination = sizeof($combinations)-1; } } ```` Follow the instructions about changing the true to a false. This will become an admin controllable switch, but in the mean time, functionality is provided.
- Loading branch information