Hi I was wondering if you can help me with this. I been trying to replace the menu with the wholesale menu for tagged customers here is my nav menu code:
{%- assign child_id = forloop.index -%}
{% if link.links.size > 0 %}
-
{% for child_link in link.links %}
{% if child_link.links.size > 0 %}
- Hit space bar to expand submenu{{child_link.title | escape }}
- {{grand_child_link.title | escape }} {% endfor %}
- {{child_link.title | escape }} {% endif %} {% endfor %}
-
{% for grand_child_link in child_link.links %}
{% endif %}
-
{% render 'social-profiles' %}
© {{ 'now' | date: "%Y" }} {{ shop.name | link_to: routes.root_url }}
Menu is closedI tried your way and this also and both did not work:
Once you find it, replace it with the following for mobile navigation:
{% assign menu_handle = ‘main-menu’ %}
{% if customer %}
{% if customer.tags contains ‘wholesale’ %}
{% assign menu_handle = ‘main-menu-wholesale’ %}
{% endif %}
{% endif %}
{% for link in linklists[menu_handle].links %}
Or with this for desktop navigation:
{% assign menu_handle = ‘main-menu’ %}
{% if customer %}
{% if customer.tags contains ‘wholesale’ %}
{% assign menu_handle = ‘main-menu-wholesale’ %}
{% endif %}
{% endif %}
{% include ‘site-nav’, linklist: menu_handle %}