# Combine Multifilter and NotFilter for $criteria-\>addFilter()

**URL:** <https://forum.shopware.com/t/combine-multifilter-and-notfilter-for-criteria-addfilter/99894>\
**Category:** Shopware 6 (English)\
**Tags:** general, programming, templates--design, other, themes--design, offizielle-shopware-\
**Created:** [30. Mai 2023 um 16:21 UTC](https://forum.shopware.com/t/combine-multifilter-and-notfilter-for-criteria-addfilter/99894 "2023-05-30T16:21:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shopwarer1638](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@shopwarer1638](https://forum.shopware.com/u/shopwarer1638)\
**Post date:** [30. Mai 2023 um 16:21 UTC](https://forum.shopware.com/t/combine-multifilter-and-notfilter-for-criteria-addfilter/99894/1 "2023-05-30T16:21:37Z")

</div>

How can I combine Multifilter and NotFilter for $criteria-\>addFilter?

This doesn’t work:

```auto
$criteria->addFilter(
    new MultiFilter(
        Multifilter::CONNECTION_OR,
        [
            new PrefixFilter('product.properties.name', 'Name1')
        ]
    ),
    new NotFilter(
        NotFilter::CONNECTION_OR,
        [
            new EqualsFilter('product.properties.group.name', 'Groupname1')
        ]
    ),
);

```
