Align or Justify Related Products for Minimal theme

New Member
5 0 0

Hi, I am working with the Minimal theme and just added the Related Products section.  I tried some of the other suggestions posted in the forum but nothing worked.  Here's the code for the snippet below.  Thanks in advance.

 

{% comment %}
Collections to ignore.
Never pick related items from those.
{% endcomment %}

{% assign exclusions = 'frontpage,all' | split: ',' %}

{% comment %}
Looking for a relevant collection.
{% endcomment %}

{% assign found_a_collection = false %}
{% if collection and collection.all_products_count > 1 %}
{% unless exclusions contains collection.handle %}
{% assign found_a_collection = true %}
{% endunless %}
{% endif %}
{% unless found_a_collection %}
{% for c in product.collections %}
{% unless exclusions contains c.handle or c.all_products_count < 2 %}
{% assign found_a_collection = true %}
{% assign collection = c %}
{% break %}
{% endunless %}
{% endfor %}
{% endunless %}

{% comment %}
If we have a relevant collection.
{% endcomment %}

{% if found_a_collection %}
{% assign counter = 0 %}
{% assign break_at = 4 %}
{% assign current_product = product %}

{% capture related_items %}
{% for item in collection.products %}
{%- include 'bold-product' with item, hide_action: 'skip' -%}
{% unless item.handle == current_product.handle %}
{% include 'product-item' with grid: 'grid-item-16' %}
{% assign counter = counter | plus: 1 %}
{% if counter == break_at %}
{% break %}
{% endif %}
{% endunless %}
{% endfor %}
{% endcapture %}

{% assign related_items = related_items | trim %}

{% unless related_items == blank %}
<aside class="products-related">
<h2>{{ 'products.other.related_products' | t }}</h2>
<div class="grid" data-product-item-wrapper>
{{ related_items }}
</div>
</aside>
{% endunless %}


{% endif %}

0 Likes

Hello 

Can you share your site url? so that i can check and let you know.

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes
Navigator
357 39 40

it needs css than coding, will need website link and password if any, then can let you know

you are welcome to contact / donate small amount to me.
My email - suyash.patankar@gmail.com

paypal.me/suyashpatankar
0 Likes
New Member
5 0 0

Unfortunately this is a client account so I cannot give out the username and password, but I think I was able to figure it out.  I just added the <center> tag to the snippet and it looks way better!  Thanks for the feedback however.

0 Likes