Search products by attribute options
-
Where can I find method in Bagisto files which can provide get products by a
attribute_options
id. There is that method exists in some repository, or shloud I create it? Thank you -
Hi @Gniewoj,
An inverse relationship has not been made, you need to create the method.
I guess you are looking for this i.e.,
packages/Webkul/Product/src/Repositories/ProductRepository.php ----> searchProductByAttribute()
-
Thank you @devansh-webkul
In this function i can searching by assigned attribute, but I need search by specific attribute options id -
Hi,
Obviously
attribute options
are linked withattribute
. Just fetch attribute id from attribute option and then the method will do their job.