Sunnysideup\EcommerceProductVariation\Model\Buyables\ProductWithVariationDecorator::getVariationByAttributes
returns the matching variation if any.
Signature
public function getVariationByAttributes(array
$attributes,
[boolean
$searchAllProducts = false] )
Parameters
$attributes
— array- formatted as (TypeID => ValueID, TypeID => ValueID)
$searchAllProducts
— boolean- - show results from any variation matching the combination
this will return a DataList
Returns
- ProductVariation|Datalist|null