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
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
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.
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 %}
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 ???
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:
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.
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-store-without-an-app) 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
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!
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.
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.
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 (:
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.
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-store-without-an-app 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
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?