My entries have a field containing a third-party product id and a price, separated by a hyphen, like so:
p666a-12.99
In the template, a plugin is returning me some product ids, and I want to return all entries containing those product ids. I know I can fetch all entries, reduce the custom field down to the product id and compare it to the product ids returned from the plugin, but that seems a bit tardy.
Can I filter my entries using the custom field directly?
{# pluginIds = 'p666a, p678a' #}
{% set entries = craft.entries.section('sectionName').customField(pluginIds) %}