How do I exclude certain products from the product recommendations (debut theme)?

n_bcn
Excursionist
18 1 1

Hello, 

 

Can anybody tell me if it is possible to exclude a specific product from the dynamic product recommendations on the debut theme?

 

One of my store products is a warranty which pops up as an upsell when another product is added to cart. The warranty keeps appearing in recommended products but I don't want it to be displayed as a product in its own right, if that makes sense.

 

Thanks!

0 Likes
KetanKumar
Shopify Partner
20524 2121 7737

Hello, @n_bcn 

Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
n_bcn
Excursionist
18 1 1

Hi,

 

My site URL is: https://bbeaut.com/

 

See attached photo - the product showing on the left hand side (1 year limited warranty) is the one I would like to hide from the related product recommendations. 

 

Thanks! 

 

Screenshot 2020-02-08 at 19.49.19.png

 

0 Likes
KetanKumar
Shopify Partner
20524 2121 7737

Hello, @n_bcn 

It can be done by doing some code customization. please send me a personal message and we can discuss what you'd like

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
route_teren
New Member
1 0 0

Hello! 

I am having the same issue with a site I'm working on. Were you able to figure out a solution? I'd be interested in learning more.

 

Thanks,

0 Likes
Denis_A
Shopify Partner
273 39 47

@route_teren @n_bcn 

Can help you with that. Send me dm

Thank you!

Get help with your Shopify store that you are looking for.
Shoot me an email: denis@thewebave.com
https://thewebave.com/
0 Likes
TroWul
Excursionist
28 0 3

I am looking to remove some pruducts aswell if anyone could help me?

KetanKumar
Shopify Partner
20524 2121 7737

Hello, @TroWul 

Welcome to the Shopify community!
and Thanks for your Good question.

Please share your site URL,
So I will check and provide a solution here.

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Peakmood
New Member
2 0 0

HI my shop url is Peakmood.nl

 

and I would like to exclude the product DHEA Max, any suggestions?

 

Peakmood_0-1617805028249.png

 

0 Likes
Peakmood
New Member
2 0 0

{%- liquid
assign recommend_products = true
if recommendations.products and recommendations.products_count > 0
assign related_collection = recommendations
endif
-%}

{% comment %}
Check if the utility tag defines related section
{% endcomment %}
{%- liquid
for tag in product.tags
if tag contains '_related'
assign include_collection_handle = tag | split: '_' | last
assign include_collection = collections[include_collection_handle]
if include_collection != empty and include_collection.products_count > 0
assign related_collection = include_collection
assign recommend_products = false
break
endif
endif
endfor

assign number_of_products = 13
assign grid_item_width = 'grid-product--small'
case section.settings.per_row
when 'medium'
assign number_of_products = 14
assign grid_item_width = 'grid-product--medium'
when 'large'
assign number_of_products = 15
assign grid_item_width = 'grid-product--large'
endcase
assign number_of_products_to_fetch = number_of_products
unless recommend_products
assign number_of_products_to_fetch = number_of_products | plus: 1
endunless
-%}

{%- if section.settings.show_product_recommendations -%}
<div
data-subsection
id="Recommendations-{{ product.id }}"
data-section-id="{{ product.id }}"
data-section-type="product-recommendations"
data-enable="{{ recommend_products }}"
data-product-id="{{ product.id }}"
data-url="{{ routes.product_recommendations_url }}"
data-limit="{{ number_of_products_to_fetch }}">

<div
data-subsection
data-section-id="{{ product.id }}"
data-section-type="featured-collection"
data-scrollable="true"
data-product-sliders-mobile="false"
data-paginate="false"
class="index-section">

<div class="page-width">
<header class="section-header" data-aos>
<h2 class="section-header__title appear-delay">
{{ section.settings.product_recommendations_heading }}
</h2>
</header>
</div>

<div class="overflow-scroll-wrap" data-ajax-loader>
<button
type="button"
class="btn btn--tertiary overflow-scroller__arrow overflow-scroller__arrow--left overflow-scroller--disable-left small--hide"
aria-hidden="true"
aria-label="{{ 'general.pagination.previous' | t }}"
data-arrow>
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-chevron-left" viewBox="0 0 284.49 498.98"><path d="M249.49 0a35 35 0 0 1 24.75 59.75L84.49 249.49l189.75 189.74a35.002 35.002 0 1 1-49.5 49.5L10.25 274.24a35 35 0 0 1 0-49.5L224.74 10.25A34.89 34.89 0 0 1 249.49 0z"/></svg>
</button>
<button
type="button"
class="btn btn--tertiary overflow-scroller__arrow overflow-scroller__arrow--right small--hide"
aria-hidden="true"
aria-label="{{ 'general.pagination.next' | t }}"
data-arrow>
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-chevron-right" viewBox="0 0 284.49 498.98"><path d="M35 498.98a35 35 0 0 1-24.75-59.75l189.74-189.74L10.25 59.75a35.002 35.002 0 0 1 49.5-49.5l214.49 214.49a35 35 0 0 1 0 49.5L59.75 488.73A34.89 34.89 0 0 1 35 498.98z"/></svg>
</button>
<div class="overflow-scroller" data-pagination-wrapper>

{%- if recommend_products -%}
<div class="product-recommendations-placeholder">
<div
class="grid grid--uniform visually-invisible"
data-product-container
aria-hidden="true">
{%- render 'product-grid-item'
product: product,
grid_item_width: grid_item_width,
no_modal: true
-%}
</div>
</div>
{%- endif -%}

{%- if related_collection.products_count > 1 -%}
<div class="product-recommendations">
<div
class="grid grid--uniform grid--scattered-large-2 grid--scattered-small-2"
data-aos="overflow__animation"
data-product-container>

{%- assign current_product = product -%}
{%- assign current_product_found = false -%}
{%- assign related_count = 0 -%}
{%- for product in related_collection.products limit: number_of_products_to_fetch -%}
{%- if product.handle == current_product.handle -%}
{%- assign current_product_found = true -%}
{%- else -%}
{%- assign related_count = related_count | plus: 1 -%}
{%- unless related_count > number_of_products -%}
{%- if forloop.last and current_product_found -%}
{%- render 'product-grid-item'
product: product,
grid_item_width: grid_item_width,
no_modal: true
-%}
{%- else -%}
{%- render 'product-grid-item'
product: product,
grid_item_width: grid_item_width,
no_modal: true
-%}
{%- endif -%}
{%- endunless -%}
{%- endif -%}
{%- endfor -%}

</div>
</div>
{%- endif -%}
</div>
</div>
</div>
</div>
{%- endif -%}

{% schema %}
{
"name": "Product recommendations",
"settings": [
{
"type": "checkbox",
"id": "show_product_recommendations",
"label": "Show dynamic recommendations",
"info": "Dynamic recommendations change and improve with time. [Learn more](https://help.shopify.com/en/themes/development/recommended-products)",
"default": true
},
{
"type": "text",
"id": "product_recommendations_heading",
"label": "Heading",
"default": "You may also like"
},
{
"type": "select",
"id": "per_row",
"label": "Products per row",
"default": "small",
"options": [
{
"value": "small",
"label": "3"
},
{
"value": "medium",
"label": "4"
},
{
"value": "large",
"label": "5"
}
]
}
]
}
{% endschema %}

0 Likes