Excluding Products In Data Feed Export

Hi,
Loving the flexibility of the Data Feeds add-on to export my products to Facebook and Google Merchant Centre, but i'm wanting the option to exclude specific products from being included in the feeds. Anyone have any advice on how to do this?

I thought by using a product tag, something like "data-fee-exclude" and applying it to the select products I don't want included? Would the code to execute this be difficult?

Thanks in advance.

You can use the Products in default setting, but with few changes

Open the app/addons/data_feeds/func.php file and replace

$params['pid'] = explode(',', $datafeed_data['products']);

with

$params['exclude_pid'] = explode(',', $datafeed_data['products']);

(!) Not tested

Excellent, that works! Thank you so much!

Would the same work with categories? ie, i want to assume the entire catalog is selected for export and I ONLY speicfy the exclusions.

Would this code be correct from the same func.php file?

    if (!empty($datafeed_data['categories'])) {
            $params['cid'] = explode(',', $datafeed_data['categories']);
            $params['subcats'] = 'Y';
            $params['skip_view'] = 'Y';
            $params['extend'] = array('categories');
        }

would become:

    if (!empty($datafeed_data['categories'])) {
            $params['exclude_cid'] = explode(',', $datafeed_data['categories']);
            $params['subcats'] = 'Y';
            $params['skip_view'] = 'Y';
            $params['extend'] = array('categories');
        }

thanks in advance!

Unfortunately, there is no exclude_cid parameter out of the box. So it will be skipped by the system. It is required to extend the fn_get_products function

Unfortunately, there is no exclude_cid parameter out of the box. So it will be skipped by the system. It is required to extend the fn_get_products function

Ok, excluding products works great for now. Thanks so much for help :-)

You are welcome! :)