Solved

Can you add a separate menu for wholesale in Shopify's Debut theme?

HealthPulze
New Member
5 0 0

Hi

 

I managed to add separate wholesale for my online store where they have access for wholesale products (different pricing) and everything works out well. The only thing couldn't solve it is to add a different menu for wholesale

 

Someone mentioned how to do it but it's not working for me, I am using Debut theme 

 

I copied most of the wholesale coding from this link

 

https://www.envision.io/blogs/ecommerce-pulse/80312001-how-to-add-a-wholesale-area-to-your-shopify-s...

 

please help me I would really appreciate it

Accepted Solutions (2)

Ninthony
Shopify Partner
2329 350 1023

This is an accepted solution.

You can assign a linklist to a variable depending on customer tags. Make a linklist called "wholesale" and put the links in it that you want to appear for wholesalers. Then you can go into your site-nav.liquid in your snippets folder and at the top you can assign the user_link_list with this code:

 

// in this if statement use whatever you tag your wholesalers with after "contains"
{% if customer.tags contains 'wholesale' %} {% assign user_link_list = 'wholesale' %} {% else %} {% assign user_link_list = section.settings.main_linklist %} {% endif %}

Then a couple lines down look for this forloop code:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change it to:

 

  {% for link in linklists[user_link_list].links %}

Now if your customer is logged in and is tagged "wholesale" then they'll see the "wholesale" links

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄

View solution in original post

Ninthony
Shopify Partner
2329 350 1023

This is an accepted solution.

Go into your header.liquid file in your Sections folder and do the same thing, put the if statement and the variable assignment at the top and then find:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change to:

 

{% for link in linklists[user_link_list].links %}
If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄

View solution in original post

Replies 21 (21)

Ninthony
Shopify Partner
2329 350 1023

This is an accepted solution.

You can assign a linklist to a variable depending on customer tags. Make a linklist called "wholesale" and put the links in it that you want to appear for wholesalers. Then you can go into your site-nav.liquid in your snippets folder and at the top you can assign the user_link_list with this code:

 

// in this if statement use whatever you tag your wholesalers with after "contains"
{% if customer.tags contains 'wholesale' %} {% assign user_link_list = 'wholesale' %} {% else %} {% assign user_link_list = section.settings.main_linklist %} {% endif %}

Then a couple lines down look for this forloop code:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change it to:

 

  {% for link in linklists[user_link_list].links %}

Now if your customer is logged in and is tagged "wholesale" then they'll see the "wholesale" links

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
HealthPulze
New Member
5 0 0

Thanks so much!!!!!

 

it worked !!!!!


@Ninthony wrote:

You can assign a linklist to a variable depending on customer tags. Make a linklist called "wholesale" and put the links in it that you want to appear for wholesalers. Then you can go into your site-nav.liquid in your snippets folder and at the top you can assign the user_link_list with this code:

 

// in this if statement use whatever you tag your wholesalers with after "contains"
{% if customer.tags contains 'wholesale' %} {% assign user_link_list = 'wholesale' %} {% else %} {% assign user_link_list = section.settings.main_linklist %} {% endif %}

Then a couple lines down look for this forloop code:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change it to:

 

  {% for link in linklists[user_link_list].links %}

Now if your customer is logged in and is tagged "wholesale" then they'll see the "wholesale" links



@Ninthony wrote:

You can assign a linklist to a variable depending on customer tags. Make a linklist called "wholesale" and put the links in it that you want to appear for wholesalers. Then you can go into your site-nav.liquid in your snippets folder and at the top you can assign the user_link_list with this code:

 

// in this if statement use whatever you tag your wholesalers with after "contains"
{% if customer.tags contains 'wholesale' %} {% assign user_link_list = 'wholesale' %} {% else %} {% assign user_link_list = section.settings.main_linklist %} {% endif %}

Then a couple lines down look for this forloop code:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change it to:

 

  {% for link in linklists[user_link_list].links %}

Now if your customer is logged in and is tagged "wholesale" then they'll see the "wholesale" links


 

alyssamae
New Member
6 0 0

I am trying to solve the same exact issue and can't seem to make this solution work 😞

I am also using the Debut theme. However, I don't have the code: 

{% for link in linklists[section.settings.main_linklist].links %}

in my site-nav.liquid. The closest thing I have is:

{% for link in linklists[linklist].links %} 

I tried replacing it with the code listed but my entire menu goes away completely. If you'd be willing to share any advice I'd appreciate it! Thanks!

Ninthony
Shopify Partner
2329 350 1023

So main_linklist and linklist are just section settings. You'll want to either assign the section setting to a variable, or set the wholesale linklist to that same variable based on if the customer is tagged wholesale or not and do that above the forloop. So something like this:

{% assign current_linklist = section.settings.linklist %}
{% if customer.tags contains 'wholesale' %}
  {% assign current_linklist = 'wholesale-menu' %}  
{% endif %}

{% for link in linklists[current_linklist].links %}
  {{ link.title }}
{% endfor %}

 

In the beginning you can see we're setting the current_linklist variable to whatever is set in the section settings. This is assuming that "linklist" is the id in the section schema. After that, we check the customer's tags and if it contains "wholesale" as a tag, if it does then we assign the current_linklist to be "wholesale-menu" -- this assumes the handle of your navigation for your wholesale menu is "wholesale-menu". If you were a customer without a "wholesale" tag, the forloop would output the titles of whatever linklist was set through the section settings. If it was a customer with a wholesale tag, it would output the titles for the wholesale menu linklist.

 

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
alyssamae
New Member
6 0 0

Thank you so much for responding and for explaining this so well. I think I am finally beginning to grasp what is going on here.

I have tried editing this in my site-nav.liquid as well as my header.liquid and still haven't had success. When I edit the code in both, my menu goes away entirely. If I edit one or the other, the menu remains my standard main menu. Should I be editing this in another section or snippet? 

Thank you again for your help and patience in explaining! I feel like I'm so close. This is my first time ever attempting to edit code so this is all Greek to me (: 

Ninthony
Shopify Partner
2329 350 1023

There's no way for me to tell what's really going wrong without seeing your code, knowing the handles of your menus, or knowing how your customers are tagged. If you'd like I can request access to your theme. You can send me a DM with your store url and exactly what you're trying to do and I can see if I can get it figured out for you, then I can explain it so you have an idea next time you do something similar.

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
ahsan881
Visitor
1 0 0

hi ninthony i followed the instruction mostly from here https://www.envision.io/blogs/ecommerce-pulse/80312001-how-to-add-a-wholesale-area-to-your-shopify-s... and followed your step in conversation i am only stuck on on point when i am loged in whole sale customer section its shows ok but on top it show retail collection menu as well which i dont want to show my wholesale clint can please help me out i can give you  access to my store please i am really tired trying out every thing.thanks a lot 

tpottie
Visitor
2 0 0
Do you get this email personally? I would like to help you.

ZeinaZone
Visitor
1 0 0

I'm trying to create one template to hold all sections so that i can fell free to add more sections in my other pages because the main theme template cannot be added to other pages unless to create a new template.

 

thank you 

ibrahim 

HealthPulze
New Member
5 0 0

hey, I noticed the code worked out for the desktop version, but the mobile version is not working where the menu is not showing up


@Ninthony wrote:

You can assign a linklist to a variable depending on customer tags. Make a linklist called "wholesale" and put the links in it that you want to appear for wholesalers. Then you can go into your site-nav.liquid in your snippets folder and at the top you can assign the user_link_list with this code:

 

// in this if statement use whatever you tag your wholesalers with after "contains"
{% if customer.tags contains 'wholesale' %} {% assign user_link_list = 'wholesale' %} {% else %} {% assign user_link_list = section.settings.main_linklist %} {% endif %}

Then a couple lines down look for this forloop code:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change it to:

 

  {% for link in linklists[user_link_list].links %}

Now if your customer is logged in and is tagged "wholesale" then they'll see the "wholesale" links


 

Ninthony
Shopify Partner
2329 350 1023

This is an accepted solution.

Go into your header.liquid file in your Sections folder and do the same thing, put the if statement and the variable assignment at the top and then find:

 

{% for link in linklists[section.settings.main_linklist].links %}

and change to:

 

{% for link in linklists[user_link_list].links %}
If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
HealthPulze
New Member
5 0 0

Thanks Ninthony, much appreciate it

 

I will definitely need your help soon regarding implement shipping rates based on type of products but I don't need it at this moment. Your help for the wholesale thing won't forget it  😀🙏🏼

 

 

Ninthony
Shopify Partner
2329 350 1023

Well I'm just going to chime in and let you know that Shopify doesn't have support for shipping rates on specific groups of products. I believe you'll need an app for that. Otherwise you have to charge a flat rate, you can give discounts at a certain price spent, or you can charge for shipping based on weight.

 

You'll need an app to do this, I'm not sure if there's a free one but I've heard of this one:

 

https://apps.shopify.com/vendor-shipping-rules-1

 

which gets pretty good reviews, but I can't really speak for it myself as I haven't used it. Our company uses a flat rate with USPS

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
RainbowGlitter
Shopify Partner
18 1 3

Hi, hopeing you can help me. I created the wholesale section as mentioned above many times before with debut theme. However the header.liquid file for colorblock theme is different. Can you please tell me where to insert the code on that theme? I've been at this for 4 days. 

I appreciate any help.

If I was able to help you please Like it and Mark it as Solution!
alyssamae
New Member
6 0 0

I am trying to solve the same issue and it seems like I get close with your solution but am still unsuccessful. I can't seem to find the code in my site-nav.liquid that you list below that needs to be changed. I have something similar but when I replace it, my menu goes away entirely. If you have any suggestions I'd really appreciate it!

Here is the code I have that I tried replacing with what you have listed. 

{% for link in linklists[linklist].links %}

MsMelody
Explorer
69 0 30

Hi @Ninthony hope you can read and check this, I have already applied the codes from this tutorial https://www.envision.io/blogs/ecommerce-pulse/80312001-how-to-add-a-wholesale-area-to-your-shopify-s...

However, I have skipped the Step 4 due to unavailability of Theme templates in Products section. The codes are not working, and I guess this is because I skipped the Step 4. Can you please help me to assign the 'wholesale' template to Wholesale products using liquid codes, if possible? 

I am currently using Debut theme.

Thank you in advance!

IamMelody
lb_dag
Excursionist
18 1 0

@Ninthony 

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:

<nav class="pushy{% if section.settings.navigation_type == 'top' or section.settings.navigation_type == 'mega'%} pushy-container{% endif %} pushy-left header-nav-pushy" id="pushy-menu">
  <div class="pushy-inner pb100">
    <div class="panel-group panel-group-nav mb40" id="accordion" role="tablist" area_multiselectable="true">
       {% assign firstLevelMenu = linklists[section.settings.main_linklist]%}
      {% for link in firstLevelMenu.links %}
 
        {%- assign child_id = forloop.index -%}
        {% if link.links.size > 0 %}
          <div class="panel-heading" role="tab">
            <a href="#{{link.title | escape | handle }}_{{child_id}}" data-link-url="{{link.url}}" role="button" data-toggle="collapse" data-parent="#accordion" data-toggle="collapse" class="second_level_drop_link collapsed" aria-haspopup="true" area_expended="true"  area_controls="collapse-category" aria-expanded="false">
              <span class="visuallyhidden">Hit space bar to expand submenu</span>{{link.title | escape }} <i class="lin lin-arrow-right"></i></a>
          </div>
          <div class="panel-collapse collapse" role="tabpanel" area_labelledby="collapse-category" id="{{link.title | escape | handle}}_{{child_id}}">
            <ul class="panel-group-nav-list second-level-nav-list">
              {% for child_link in link.links %}
                {% if child_link.links.size > 0 %}
                   <li><a href="#{{child_link.handle | escape  | handle}}_{{child_id}}" data-link-url="{{child_link.url}}" class="dropdown-menu-links third_level_drop_link collapsed" data-toggle="collapse" aria-haspopup="true" data-parent="#{{link.handle | escape | handle}}_{{child_id}}">
                    <span class="visuallyhidden">Hit space bar to expand submenu</span>{{child_link.title | escape }} <i class="lin lin-arrow-right"></i></a></li>
                  <div class="panel-collapse collapse" role="tabpanel" area_labelledby="collapse-category" id="{{child_link.handle | escape | handle}}_{{child_id}}"  aria-expanded="false">
                    <ul class="panel-group-nav-list third-level-nav-list ">
                      {% for grand_child_link in child_link.links %}
                      <li><a href="{{grand_child_link.url}}" data-parent="#{{child_link.handle | escape | handle}}">{{grand_child_link.title | escape }}</a></li>
                      {% endfor %}
                    </ul>
                  </div>
                  {% else %}
              <li>
                <a href="{{child_link.url}}" class="dropdown-menu-links">{{child_link.title | escape }}</a>
              </li>
            {% endif %}
              {% endfor %}
            </ul>
          </div>
          {% else %}
          <div class="panel-heading"><a href="{{ link.url }}">{{ link.title | escape }}</a></div>
        {% endif %}
      {% endfor %}
    {% if settings.show_multiple_currencies %}
      <!-- <div class="panel-heading mobile-currency-wrapper desktop-hidden-sm" role="tab">
 
        <i class="lin lin-arrow-right"></i>
      </div> -->
      <div class="desktop-hidden-sm">
        {% render "currency-switcher" mob_nav: true %}
      </div>
 
    {% endif %}
    </div>
    <div class="nav-bottom-area">
      {%- if section.settings.header_social_icons -%}
        <ul class="nav-main-social">
          {% render 'social-profiles' %}
        </ul>
      {%- endif -%}
      <p class="nav-main-copy">&copy; {{ 'now' | date: "%Y" }} {{ shop.name | link_to: routes.root_url }}</p>
      <button class="close-pushy-menu visuallyhidden">Menu is closed</button>
    </div>
  </div>
</nav>

 

 

 

I 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 %}

tpottie
Visitor
2 0 0

I managaed to get the different menu but I can't figure out how to have my inventory adjust in both places.

HealthPulze
New Member
5 0 0
Hi

I have store for the customers and for wholesalers and the menu I asked is for stockists which are my wholesalers.

So you will need first to apply code to differentiate the regular products and wholesalers products by assigning tags, I will send you the link where I got the wholesale coding from which you can copy the idea to your store.

This is the link:
https://www.envision.io/blogs/ecommerce-pulse/80312001-how-to-add-a-wholesale-area-to-your-shopify-s...


BTW sorry for late reply.

Allyah
mysticheadbands
New Member
4 0 0

Hi Ninthony- I'm wondering if (and hoping that) you can help. My goal is to have a few products viewable only to wholesale customers, so I used the instructions from the link shared above (https://www.envision.io/blogs/ecommerce-pulse/80312001-how-to-add-a-wholesale-area-to-your-shopify-s...) and then also followed your instructions for creating the menu. I have not been able to get my wholesale products to be hidden from my "shop" page no matter what I've tried. I went through the steps again, and possibly I'm missing one tiny thing, or maybe the instructions at that link are outdated for the current version of Debut I'm using. Do you have any suggestions? Thank you in advance! Pam

mysticheadbands
New Member
4 0 0

I believe I just figured it out so I am posting in case anyone else is racking their brain about this. I had to create a separate collection to put my retail products in so that only those showed for retail customers. My "shop" link was by default pointing to all products so it was including everything. I've now gone through each of my retail products and added them to that retail collection. Fingers crossed that it is now solved!