Skip to main content

All Questions

Filter by
Sorted by
Tagged with
8 votes
2 answers
2k views

Filter a collection by NOT FIND_IN_SET

I need to filter a collection by a negative FIND_IN_SET. I know I can do this: $collection->addAttributeToFilter( 'attribute_code', [['finset' => 4], ['null' => true]] ); This ...
Giel Berkers's user avatar
  • 12.3k
2 votes
1 answer
1k views

How do I get my Collection to use a different DB connection?

So I have extended a Magento collection to obtain my own collection only I want to use a different DB connection. What I have attempted to do is define the connection in config.xml like so: <...
user2045's user avatar
  • 831