# Hide shipping protection products from homepage, collections, related products, and search

Because of Shopify’s shopping cart system, **Shipping Protection is created as a digital product in your store.**\
When you enable the Shipping Protection widget, the app automatically generates a Shipping Protection product so it can be added to orders.\
Since this product is digital, it may appear on your storefront. Below are a few ways you can hide the Shipping Protection product from being displayed on your website.

## Hide shipping protection products from home page

Our app automatically creates a collection named **“All”** for you to manage product visibility on the homepage. If you don’t see it working as expected, you can follow the steps below or [**contact us**](https://go.crisp.chat/chat/embed/?website_id=1dc48f94-5e00-41cc-bbf5-0f11ab481983) for further assistance

**Step 1:** Go to your **Shopify store’s Collections section** > Click **Create collection**

**Step 2:** fill in "**all**" in the collection title and select the collection type as **"Smart"**

Select the condition as "**all conditions**", then select the **product type**, select "**is not equal to**", and select the value as "**sam\_shipping\_protect**". Finally, click the "**Save**" button.

***This will exclude shipping protection items from all products.***

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2Fm4xlV6gSPmcDWQo6cFdB%2Fimage.png?alt=media&#x26;token=a6e7c20d-d733-4b07-b320-32a39c0a5146" alt=""><figcaption></figcaption></figure>

## Hide shipping protection products in specific collections

Go to your **Shopify store’s Collections section** > Click the corresponding collection

When the condition of the collection is set to "***all conditions***", the shipping protection products need to meet all conditions to appear in the collection. So you can **add another condition**, select the **product type**, select "**is not equal to**", and select the value "**sam\_shipping\_protect**". Finally, click the "**Save**" button. In this way, the shipping protection products will not appear in the collection.

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2FOBT6Ge2cxvecgWtIxxN2%2Fimage.png?alt=media&#x26;token=df210def-d175-4c2b-a664-ba3e04dd9e70" alt=""><figcaption></figcaption></figure>

When the condition of the collection is set to "***any condition***", the shipping protection product will appear in the collection when it meets any of the conditions. So if you want the shipping protection product not to appear in this type of collection, you need to check and make sure that the shipping protection product does not meet any of the conditions.

## Hide Shipping Protection from Related Products (Product Page)

If you are using Shopify’s default recommendation system (for example, I am currently using the **Dawn** theme), you will need to adjust your theme code slightly.

**Step 1:** Go to **Online Store > Theme > Edit Code**

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2FKhLtsI0qpNvmdjXMmP95%2Fimage.png?alt=media&#x26;token=87704b10-86a6-4f5c-b5cc-ae4ce3659c34" alt=""><figcaption></figcaption></figure>

\
**Step 2:** Find the file that renders related products. (For example, in the Dawn theme, it’s `related-products.liquid`)

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2FsXl2tFUEjZQqjADEjfsp%2Fimage.png?alt=media&#x26;token=9831e577-da39-45e4-9cab-9effeaaf68ec" alt=""><figcaption></figcaption></figure>

\
**Step 3:** Wrap the product items inside the `for` loop **with an `{% if recommendation.type != 'sam_protect_shipping' %} ... {% endif %}` block** to exclude Shipping Protection:

```liquid
{% for recommendation in recommendations.products %}
  {% if recommendation.type != 'sam_protect_shipping' %} 
    <li class="grid__item">
      {% render 'card-product',
        card_product: recommendation,
        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,
        skip_styles: skip_card_product_styles
      %}
    </li>
  {% endif %}
  {%- assign skip_card_product_styles = true -%}
{% endfor %}

```

After completing this, the **Shipping Protection product will no longer appear in the "related products" block** on product pages.

## Hide shipping protection products from search

To hide your **Shipping Protection** product from search results, follow these steps

**Step 1:** Go to **Settings > Metafields > Products** in your Shopify admin

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2FP5y8oUxDkNJs1KWfirEk%2FScreenshot%20(5).png?alt=media&#x26;token=f789b040-099f-4807-b0d3-33d4e3a19701" alt=""><figcaption></figcaption></figure>

**Step 2:** Click **Add definition** to create a new product metafield:

* **Name:** (e.g. *Hide Product*)
* **Namespace and key:** `seo.hidden`
* **Description:** *(optional)*
* **Type:** *Number (Integer)*

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2FhSfDUF4Qk4RY4UTcR4KS%2FScreenshot%20(7).png?alt=media&#x26;token=87d6bf36-7b13-4327-9269-9b1efcb5e7ad" alt=""><figcaption></figcaption></figure>

**Step 3:** Edit your **Shipping Protection** product — scroll down to the bottom of the product page and find the new metafield. Set its value to **1** to hide the product from search results

<figure><img src="https://1074979317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqgD8feDVhQb5QpR8qJzf%2Fuploads%2FdOQ9XV5wztv8VnBFN1a5%2FScreenshot%20(8).png?alt=media&#x26;token=12b47850-542b-47c3-85e4-ca97b0889c51" alt=""><figcaption></figcaption></figure>

Please note that the modification position may vary depending on the theme you are using. If you find it difficult, feel free to contact us and we’ll be happy to assist you:

👉 [Chat with us](https://go.crisp.chat/chat/embed/?website_id=1dc48f94-5e00-41cc-bbf5-0f11ab481983)\
📧 <info@shop-wil.com>
