How to make Searchanise work with rules for different customer groups

Modified on: Mon, Oct 1, 2018 at 11:06 AM


Searchanise allows to set up different rules for customer groups in your store. For example, if a customer has a specific tag specified, you can set up not to show product prices to this customer. It works well if you'd like to divide your store into retail and wholesale parts and in many other cases. 


First thing to make usergroup rules work


To start using Usergroup rules you should do the following: 


1. Go to Shopify admin panel -> Online store -> Themes.


2. Click Edit code for the current theme and insert the following code before the {{ content_for_header }} tag in the theme.liquid file:


<script>

    SearchaniseCustomerTags = [{% if customer.tags %}'{{ customer.tags | join: "','" }}'{% endif %}];

  </script>




! If you inserted the code from this instruction into the theme.liquid file earlier, place the usergroup rules code before the <script src="//www.searchanise.com/widgets/shopify/init.js?a=**********"></script>  code.


How to set up usergroup rules


You can set up different rules in Searchanise admin panel -> Preferences -> Usergroup rules. Add a rule by clicking the plus button.


The settings allow to show/hide products and prices for the products with a specific tag (or without any) to the customers with a specific tag (or without any).


Here are the examples of situations where usergroup rules may be helpful.


1. You'd like to show wholesale products (with the wholesale tag) only to the customers tagged wholesale.


- Enter wholesale into the For customers with tags field. 

- Choose Show Products in the Actions dropdown.

- Enter wholesale to the For products with tags field.

- Click Save rules.


2. You'd like to show prices for the products tagged VIP only to the customers with the VIP tag.


- Enter VIP into the For customers with tags field. 

- Choose Show Prices in the Actions dropdown.

- Enter VIP to the For products with tags field.

- Click Save rules.



3. You'd like to hide all the products for customers with the "restricted" and "untrusted" tags.


- Enter restricted, untrusted into the For customers with tags field. Separate tags by commas.

- Choose Hide Products in the Actions dropdown.

- Enter the * sign to the For products with tags field.

- Click Save rules.



4. You'd like to hide the prices for products with the VIP tag for all customers.


- Enter the * sign into the For customers with tags field. 

- Choose Hide Prices in the Actions dropdown.

- Enter VIP to the For products with tags field.

- Click Save rules.



Not sure how to set up a definite rule? Just contact our support team and we'll be happy to help.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.