Re: Frequently Bought Together - Dawn 12.0

How to add a 'Frequently Bought Together' section using code?

imandco
Tourist
19 0 1

Hello. Is there a way to add a "Frequently Bought Together" section on the product page using code?

 

Website: www.inhabitmarket.com

Replies 6 (6)

Danishshopdev
Shopify Partner
163 17 20

yes this is possible.

banned
imandco
Tourist
19 0 1

Okay. What would I need to do?

Danishshopdev
Shopify Partner
163 17 20

will you do it by self? or you will need to hire someone for that.

banned
imandco
Tourist
19 0 1

I can do it myself. I would appreciate your help with the code.

Danishshopdev
Shopify Partner
163 17 20

In your product-template.liquid paste this line the product descriptions ends,

  1.  
    and after that create a section  frequently-bought-together.liquid

    and paste this code in it.

 

<div class="frequently-bought-together-section">
  <h2>Frequently Bought Together</h2>
  <div class="products">
    {% for product in product.related_products %}
      <div class="product">
        <h3>{{ product.title }}</h3>
        <p>{{ product.price | money }}</p>
        <a href="{{ product.url }}">View Product</a>
      </div>
    {% endfor %}
  </div>
</div>

 

banned
imandco
Tourist
19 0 1

Thank you. but what do I have to do here? Can you share the line again?

 


@Danishshopdev wrote:

In your product-template.liquid paste this line the product descriptions ends,

  1.