Coding a private page & products

shedazzle
Visitor
2 0 0

 have been following a you tube clip to add a private page and private products to my website-

i have done half of the steps- 

but i cannot find: main-collection-product-grid.liquid

i've searched it in code section i've searched for it manually , i just cant find it.

please help, why is is not showing?

this is what im trying to do-

Step 2: Update main-collection-product-grid.liquid File

Goto main-collection-product-grid.liquid file and replace the following code:

<li
                  class="grid__item{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
                  {% if settings.animations_reveal_on_scroll %}
                    data-cascade
                    style="--animation-order: {{ forloop.index }};"
                  {% endif %}
                >
                  {% render 'card-product',
                    card_product: product,
                    media_aspect_ratio: section.settings.image_ratio,
                    image_shape: section.settings.image_shape,
                    show_secondary_image: section.settings.show_secondary_image,
                    show_vendor: section.settings.show_vendor,
                    show_rating: section.settings.show_rating,
                    lazy_load: lazy_load,
                    show_quick_add: section.settings.enable_quick_add,
                    section_id: section.id
                  %}
                </li>

With below code:

Copy Code

{% assign isPrivateProduct = false %}
                {% for tag in product.tags %}
                  {% if tag == 'private' %}
                    {% assign isPrivateProduct = true %}
                  {% endif %}
                {% endfor %}

                {% if customer %}
                  <li
                    class="grid__item{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
                    {% if settings.animations_reveal_on_scroll %}
                      data-cascade
                      style="--animation-order: {{ forloop.index }};"
                    {% endif %}
                  >
                    {% render 'card-product',

 help...

 

Replies 2 (2)

AcidPi
Shopify Partner
39 9 11

Hi
Are you using the same theme as your YouTube clip tutorial?
main-collection-product-grid.liquid is part of the dawn theme...

main-collection-product-grid Capture1.PNG




shedazzle
Visitor
2 0 0
Oh probably not, that makes sense.
Dam it