How can I customize and password protect a specific collection header for a client?

How can I customize and password protect a specific collection header for a client?

Nicole34
Tourist
7 0 2

Hello, 

 

I currently have and operating a clothing business selling apparel with my designs on it. 

 

A local business has approached me asking for me to create and distribute their apparel for their employees. I have already created their own collection with a custom template. The issue I'm having is I'm only able to alter and customize the "TEMPLATE" section. I want to be able to change and customize the HEADER area and maybe the footer if possible. I would like the employees to visit a page that has a look and feel of their company and not mine. For example the Main header logo, and the drop down menu bar gear more for them instead of my company for that Specific Collection ONLY.

 

I also need to password protect this collection so the general public can not purchase or view these products.

 
 
Replies 3 (3)

JohnE10
Shopify Partner
113 14 19

Hi,

 

In order to change the header and footer in the custom template, you'll need to use conditionals.

 

 For example, Let's say that the custom template you created for the local business is called “template-x”. And let's say that you want to display a custom header instead of the default header for “template-x”.

 

After you create the custom header, we’ll call it “header-group-x”, to suit your needs, some code modification will need to ensue.

 

In the Dawn theme for example, what you would do is this:

 

  • In the “theme.liquid” file, look for this piece of code: 

 

{% sections 'header-group' %}

 

  • Replace that piece of code with the following piece of code:

 

    {% if template.name == "template-x" %}
      {% sections 'header-group-x' %}
    {% else %}
      {% sections 'header-group' %}
    {% endif %}

 

 

And then you would just do the same thing for the footer.

 

Hope that helps.

If my reply was helpful, Like and Accept. Or Buy Me a Beverage
App Development/Custom Modifications, Visit My Gig and let me how I can help
For help with your store speed optimization, Check Out My Other Gig
Feel free to email with any questions: ProjectCoder10@gmail.com
Nicole34
Tourist
7 0 2

I kind of understand, but how do you create the custom header. It was easy to set up a custom template in the custom COLLECTIONS area which is done right in the shopify themes.  I only want the header and template area to be custom for this "ONE" collection for this one company.

 

Thank you for your help

 

 

JohnE10
Shopify Partner
113 14 19

The custom header creation and code manipulation are going to require some understanding of coding. You don't need to become a full-fledged programmer, but you'll need to pick up some basic coding knowledge.

 

If you’d rather not deal with any of that, then your other option is to hire someone to do it for you.

 

Here are two good YouTube channels for learning about Shopify theme coding. They have specific videos that show how to complete small theme modifications.

 

 

 

 

 



If my reply was helpful, Like and Accept. Or Buy Me a Beverage
App Development/Custom Modifications, Visit My Gig and let me how I can help
For help with your store speed optimization, Check Out My Other Gig
Feel free to email with any questions: ProjectCoder10@gmail.com