Related products for Brooklyn theme

Solved
Highlighted
Shopify Partner
696 101 245

@marco1295 This is a fairly old thread dating back to when you had to code this yourself, but Shopify added the functionality by default to Brooklyn in June 21 '19 so if you installed your theme after that date & you have followed/applied the code given here you may need to undo the changes you have made.

 

Here's the release note for reference:

 

Enable product recommendations for your online store

Data-driven product recommendations for your online store are now included by default in the new versions of the following Shopify free themes:

  • Debut
  • Brooklyn
  • Minimal
  • Simple
  • Venture
  • Boundless
  • Narrative

Enable the section to show product recommendations to your customers. The product recommendations are based on products that are commonly purchased together and similar products, so that customers see the most relevant suggestions.

Learn more about product recommendations from the Shopify Help Center.

If helpful then please Like and Accept Solution
0 Likes
Highlighted
Shopify Partner
3 0 0
I did it on a duplicate so I'm fine but even before I tried enabling it on my product pages but it still doesn't show.
0 Likes
Highlighted
Shopify Partner
696 101 245

hmm, what's your site URL?

 

Also I take it that you have other products in the same Collection?

 

Another thought is that your store doesn't currently meet the requirements to show anything, if you read this https://help.shopify.com/en/themes/development/recommended-products#recommendation-logic you can see this part:

 

Requirements and limitations

  • The types of product recommendations that appear are determined by your online store and your Shopify plan:

    • Purchase history and product descriptions: Plus plan and having <7000 products published in your Online Store, with an English storefront
    • Purchase history only: Plus plan and having <7000 products published in your Online Store, with a non-English storefront
    • Purchase history only: Non-Plus plan and having <7000 products published in your Online Store
    • Collections: Any plan with >7000 products published in your Online Store
If helpful then please Like and Accept Solution
1 Like
Highlighted
Shopify Partner
3 0 0
So it might be that I don't have them in the same collection then. i didn't know that was needed, I'll see if that works but the url is www.homepedics.com
0 Likes
Highlighted
New Member
3 0 0

Hi! 

 

Ive been battling with this issue for a while now and your instructions are the only ones that seem to work. I see the section in the Customize section but the problem is that it only shows recommendations for products that are Sold Out and the recommendations are also sold out products. 

Any ideas on why this is happening? It might be that its calling my sold-out collection?

 

Thanks in advance!! 

0 Likes
Highlighted
New Member
3 0 0

 

Hi @Jasoliya 

 

Ive been battling with this issue for a while now and your instructions are the only ones that seem to work. I see the section in the Customize section but the problem is that it only shows recommendations for products that are Sold Out and the recommendations are also sold out products. 

Any ideas on why this is happening? It might be that its calling my sold-out collection?

 

Thanks in advance!! 

0 Likes
Highlighted
Shopify Expert
3535 543 843

This code is work with same collection product no metter its sold out or in stock. so when you open any product it will show product from same collection.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
4 0 0

Hi , I can't see related products , is ON, but doesn't show.  Is there a way to restart the theme? thanks!

 

<!-- /templates/product.liquid -->
{% comment %}
  The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-template' %}
{% section 'product-recommendations' %}


{% if collection %}
  <hr class="hr--clear">
  <div class="text-center">
    <a href="{{ collection.url }}" class="return-link">&larr; {{ 'products.general.collection_return' | t: collection: collection.title }}</a>
  </div>
{% endif %}



youmayalso.png

0 Likes
Highlighted
Shopify Expert
3535 543 843

May be its issue with file code.

GO to section->product-recommendations.liquid file and fine 'frontpage' and remove it.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
4 0 0

Hi, thanks there is no frontpage in the code.. I reinstall de them and doesnt work too...

 

 

{%- if section.settings.show_product_recommendations -%}
  {%- if recommendations.performed -%}
    {%- if recommendations.products_count > 0 -%}
      <div class="product-recommendations__inner">
        {%- if section.settings.heading != blank -%}
          <div class="section-header text-center">
            <h2>{{ section.settings.heading | escape }}</h2>
          </div>
        {%- endif -%}
        <ul class="grid grid--uniform grid--view-items">
          {%- for product in recommendations.products -%}
            <li class="grid__item small--one-half medium-up--one-quarter">
              {% include 'product-card-grid', max_height: 250, product: product, show_vendor: section.settings.show_vendor %}
            </li>
          {%- endfor -%}
        </ul>
      </div>
    {%- endif -%}
  {%- else  -%}
    <div class="page-width" data-base-url="{{ routes.product_recommendations_url }}" data-product-id="{{ product.id }}" data-section-id="{{ section.id }}" data-section-type="product-recommendations"></div>
  {%- endif -%}
{%- endif -%}

{% schema %}
{
  "name": {
    "da": "Produktanbefalinger",
    "de": "Produktempfehlungen",
    "en": "Product recommendations",
    "es": "Recomendaciones de productos",
    "fi": "Tuotesuositukset",
    "fr": "Recommandations de produits",
    "hi": "उत्पाद की अनुशंसाएं",
    "it": "Raccomandazioni sui prodotti",
    "ja": "商品の推奨",
    "ko": "제품 권장 사항",
    "nb": "Produktanbefalinger",
    "nl": "Productaanbevelingen",
    "pt-BR": "Recomendações de produtos",
    "pt-PT": "Recomendações de produtos",
    "sv": "Produktrekommendationer",
    "th": "คำแนะนำสินค้า",
    "zh-CN": "产品推荐",
    "zh-TW": "商品推薦"
  },
  "settings": [
    {
      "type": "checkbox",
      "id": "show_product_recommendations",
      "label": {
        "da": "Vis dynamiske anbefalinger",
        "de": "Dynamische Empfehlungen anzeigen",
        "en": "Show dynamic recommendations",
        "es": "Mostrar recomendaciones dinámicas",
        "fi": "Näytä dynaamiset suositukset",
        "fr": "Afficher les recommandations dynamiques",
        "hi": "डायनेमिक सुझाव दिखाएं",
        "it": "Mostra raccomandazioni dinamiche",
        "ja": "動的推奨を表示する",
        "ko": "동적 권장 사항 표시",
        "nb": "Vis dynamiske anbefalinger",
        "nl": "Dynamische aanbevelingen weergeven",
        "pt-BR": "Mostrar recomendações dinâmicas",
        "pt-PT": "Mostrar recomendações dinâmicas",
        "sv": "Visa dynamiska rekommendationer",
        "th": "แสดงคำแนะนำแบบไดนามิก",
        "zh-CN": "显示动态推荐",
        "zh-TW": "顯示動態推薦"
      },
      "info": {
        "da": "Dynamiske anbefalinger ændres og forbedres med tiden. [Få mere at vide](https://help.shopify.com/en/themes/development/recommended-products)",
        "de": "Dynamische Empfehlungen werden im Laufe der Zeit angepasst und verbessert. [Mehr Informationen](https://help.shopify.com/en/themes/development/recommended-products)",
        "en": "Dynamic recommendations change and improve with time. [Learn more](https://help.shopify.com/en/themes/development/recommended-products)",
        "es": "Las recomendaciones dinámicas cambian y mejoran con el tiempo. [Más información](https://help.shopify.com/en/themes/development/recommended-products)",
        "fi": "Dynaamiset suositukset muuttuvat ja paranevat ajan myötä. [Lisätietoja](https://help.shopify.com/en/themes/development/recommended-products)",
        "fr": "Les recommandations dynamiques changent et s'améliorent avec le temps. [En savoir plus](https://help.shopify.com/en/themes/development/recommended-products)",
        "hi": "समय के साथ डायनेमिक सुझाव परिवर्तन और सुधार. [अधिक जानें](https://help.shopify.com/en/themes/development/recommended-products)",
        "it": "Le raccomandazioni dinamiche cambiano e migliorano nel tempo. [Maggiori informazioni](https://help.shopify.com/en/themes/development/recommended-products)",
        "ja": "動的推奨は時間とともに変化し改善します。[詳細情報](https://help.shopify.com/en/themes/development/recommended-products)",
        "ko": "동적 권장 사항은 시간이 지나면서 변하고 개선됩니다. [자세히 알아보기](https://help.shopify.com/en/themes/development/recommended-products)",
        "nb": "Dynamiske anbefalinger endrer seg og forbedres med tiden. [Finn ut mer](https://help.shopify.com/en/themes/development/recommended-products)",
        "nl": "Dynamische aanbevelingen veranderen en verbeteren mettertijd. [Meer informatie](https://help.shopify.com/en/themes/development/recommended-products)",
        "pt-BR": "As recomendações dinâmicas mudam e melhoram com o tempo. [Saiba mais](https://help.shopify.com/en/themes/development/recommended-products)",
        "pt-PT": "As recomendações dinâmicas mudam e melhoram com o tempo. [Saiba mais](https://help.shopify.com/en/themes/development/recommended-products)",
        "sv": "Dynamiska rekommendationer ändras och förbättras med tiden. [Läs mer](https://help.shopify.com/en/themes/development/recommended-products)",
        "th": "คำแนะนำแบบไดนามิกนั้นเปลี่ยนแปลงและถูกปรับปรุงให้ดีขึ้นตลอดเวลา [เรียนรู้เพิ่มเติม](https://help.shopify.com/en/themes/development/recommended-products)",
        "zh-CN": "动态推荐会随着时间而变化和改进。[了解详细信息](https://help.shopify.com/en/themes/development/recommended-products)",
        "zh-TW": "動態推薦會隨著時間改變與改進。[深入瞭解](https://help.shopify.com/en/themes/development/recommended-products)"
      },
      "default": true
    },
    {
      "type": "text",
      "id": "heading",
      "label": {
        "da": "Overskrift",
        "de": "Überschrift",
        "en": "Heading",
        "es": "Título",
        "fi": "Otsake",
        "fr": "En-tête",
        "hi": "शीर्षक",
        "it": "Heading",
        "ja": "見出し",
        "ko": "제목",
        "nb": "Overskrift",
        "nl": "Kop",
        "pt-BR": "Título",
        "pt-PT": "Título",
        "sv": "Rubrik",
        "th": "ส่วนหัว",
        "zh-CN": "标题",
        "zh-TW": "標題"
      },
      "default": {
        "da": "Du vil muligvis også synes om",
        "de": "Das könnte Ihnen auch gefallen",
        "en": "You may also like",
        "es": "También te puede interesar",
        "fi": "Saatat pitää myös näistä",
        "fr": "Vous pourriez aimer également",
        "hi": "आप शायद इसे भी पसंद करें",
        "it": "Potrebbero interessarti anche",
        "ja": "あなたへのおすすめ",
        "ko": "회원님도 좋아할 것입니다.",
        "nb": "Kanskje du også liker",
        "nl": "Wellicht vindt u dit ook leuk",
        "pt-BR": "Talvez você também goste de",
        "pt-PT": "Também poderá gostar de",
        "sv": "Du kanske också gillar",
        "th": "คุณอาจจะชอบ",
        "zh-CN": "您可能还喜欢",
        "zh-TW": "您也可能喜歡"
      }
    },
    {
      "type": "checkbox",
      "id": "show_vendor",
      "label": {
        "da": "Vis leverandør",
        "de": "Lieferanten anzeigen",
        "en": "Show vendor",
        "es": "Mostrar proveedor",
        "fi": "Näytä myyjä",
        "fr": "Afficher les vendeurs",
        "hi": "विक्रेता दिखाएं",
        "it": "Mostra fornitore",
        "ja": "販売元を表示する",
        "ko": "공급업체 표시",
        "nb": "Vis leverandør",
        "nl": "Leverancier weergeven",
        "pt-BR": "Exibir fornecedor",
        "pt-PT": "Mostrar fornecedor",
        "sv": "Visa säljare",
        "th": "แสดงผู้ขาย",
        "zh-CN": "显示厂商",
        "zh-TW": "顯示廠商"
      },
      "default": false
    }
  ]
}
{% endschema %}

 

 

0 Likes