Magento Plugin Autocomplete Results per Group

I have a need that our Magento install has products only available to logged in customers with proper group access.

How can I setup Algolia to return product results to customer groups who have access to that product? Our setup is currently disabling products for groups that should not have access.

Thank you

To follow up on this… My Magento install is using a third-party plugin called “Catalog Permissions” to enable the product based permission and visibility.

To help anyone else who might run into similar issues, while not the best implementation, this is what I ended up using to get the functionality I was looking for. My if/else statement is much longer but this is the basic idea…

I added the following code to line ~206 of the configuration.phtml

$session = Mage::getSingleton('customer/session');
$customerGroupId = $session->getCustomerGroupId();

if ($customerGroupId == 1) {
    $autocompleteApiKeyParams['filters'] = 'NOT group_visibility:"Special-Group"' ;

Hello @mmcbrien,

sorry for the late answer.
Indeed the extension doesn’t support this functionality out of the box and you have to implement it yourself. You did it right :slight_smile:

Just in case you don’t want to modify the extension files directly, I’d suggest you to use backend hooks to modify configuration. In this case you’ll be able to upgrade the extension without a need to re-do the changes.

1 Like

@jan.petr - Thaks! I have indeed re-implemented this with hooks, just wanted to understand how it shoudl work prior to investing the time and understanding into the hooks. I appreciate the repsonse.

1 Like