title: Get all product variant with the same Product Title on Shopify
body: <p>So, it's like this. Even I am confused about how to explain this. </p>
  
  <p>Situation:</p>
  
  <p>All the products in our store regardless if it is the same styled product has only one Color Variant each. So meaning, all colors of the same product are separated (example: Mulan has 9 different colors, so we have listed each color as one product). If you get what I mean. Like this: <a href="http://prntscr.com/qnwygd" rel="nofollow noreferrer">http://prntscr.com/qnwygd</a></p>
  
  <p>What I need: </p>
  
  <p>We wanted to show all available variants/colors to all products with the same name/style. Like this: <a href="http://prntscr.com/qnwzf2" rel="nofollow noreferrer">http://prntscr.com/qnwzf2</a></p>
  
  <p>Question: 
  How do we get to do this? Please give me some ideas. If you have any questions/confusion, please don't hesitate to ask. </p>
  
  <p>Here's the code I currently have. </p>
  
  <pre><code> {% capture form_id %}AddToCartForm-{{ section_id }}{% endcapture %}
  {% form 'product', product, id: form_id, class: 'product-single__form' %}
  
     {% unless product.options.size == 1 and product.variants[0].title == 'Default Title' %}
      {% for option in product.options_with_values %}
        {% assign hide = false %}
        {% if option.name == 'color' and product.metafields.color.value %}
          {% assign hide = true %}
        {% endif %}
        {% if settings.variant_type == 'button' %}
          {% include 'variant-button', section_id: section_id, option_drop: option, hide: hide %}
        {% else %}
          {% include 'variant-dropdown', section_id: section_id, hide: hide %}
        {% endif %}
      {% endfor %}
    {% endunless %}
  
   &lt;!--  {% comment %}
      [Custom Feature] Color swatches
    {% endcomment %}
    {% if product.metafields.color.value %}
      {% assign product_types = product.type | split: ',' %}
      {% assign product_type = product_types[3] | handle %}
      {% comment %} The most specific hierarchy = fourth field in product type {% endcomment %}
      {% if collections[product_type] %}
        &lt;div class="color-swatches"&gt;
          &lt;label class="variant__label"&gt;Colors&lt;/label&gt;
          {% include 'swatch' with product_type %}
        &lt;/div&gt;
      {% endif %}
    {% endif %}--&gt;
  
    &lt;select name="id" id="ProductSelect-{{ section_id }}" class="product-single__variants no-js"&gt;
      {% for variant in product.variants %}
        {% if variant.available %}
          &lt;option {% if variant == product.selected_or_first_available_variant %}
            selected="selected" {% endif %}
            value="{{ variant.id }}"&gt;
            {{ variant.title }} - {{ variant.price | money_with_currency }}
          &lt;/option&gt;
        {% else %}
          &lt;option disabled="disabled"&gt;
            {{ variant.title }} - {{ 'products.product.sold_out' | t }}
          &lt;/option&gt;
        {% endif %}
      {% endfor %}
    &lt;/select&gt;
  
    {% if settings.quantity_enable %}
      &lt;div class="product__quantity product__quantity--{{ settings.variant_type }} js-qty"&gt;
        &lt;label for="Quantity-{{ section_id }}"&gt;{{ 'products.product.quantity' | t }}&lt;/label&gt;
        &lt;input type="number" hidden="hidden" id="Quantity-{{ section_id }}" name="quantity" value="1" min="1" class="js-qty__fallback"&gt;
      &lt;/div&gt;
    {% endif %}
  
  &lt;!--   &lt;div class="rte"&gt;
      &lt;div class="product-outofstock-message"&gt;
        {{ 'products.product.outofstock_email_notify_html' | t }}
      &lt;/div&gt;
    &lt;/div&gt; --&gt;
  
    {% if settings.enable_payment_button %}
      &lt;div class="payment-buttons"&gt;
    {% endif %}
  
      &lt;button
        {% if product.empty? %}type="button"{% else %}type="submit"{% endif %}
        name="add"
        id="AddToCart-{{ section_id }}"
        class="{% if settings.enable_payment_button %}btn--tertiary{% else %}btn{% endif %} btn--full add-to-cart"
        {% unless current_variant.available %} disabled="disabled"{% endunless %}&gt;
        &lt;span id="AddToCartText-{{ section_id }}"&gt;
          {% if current_variant.available %}
            {{ 'products.product.add_to_cart' | t }}
          {% else %}
            {{ 'products.product.sold_out' | t }}
          {% endif %}
        &lt;/span&gt;
      &lt;/button&gt;
  &lt;!--     ADDITIONAL ADD TO WISHLIST    --&gt;
  
        &lt;div style="display: flex; flex-wrap: wrap"&gt;
          &lt;div id="smartwishlist" data-product="{{ product.id }}" data-variant="{{ product.variants.first.id }}" style="outline:none;margin-top:15px; border:1px solid black;font-weight:100;flex-basis:0;flex-grow:1;max-width:50%"&gt;&lt;/div&gt;
          &lt;a onclick="justClick()" class="btn--secondary update-cart share-this-item" style="margin-top:15px; border:none;font-weight:100;flex-basis:0;flex-grow:1;max-width:50%"&gt;
            &lt;span&gt;
              Or, share this item
            &lt;/span&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;script type="text/javascript"&gt;
          function justClick(){
            document.getElementById("ztb-sb-9abf1166-widget").style.display="block !important"
          }
        &lt;/script&gt;
  &lt;!--  END --&gt;
  
  
      {% if settings.enable_payment_button %}
        {{ form | payment_button }}
      {% endif %}
  
    {% if settings.enable_payment_button %}
      &lt;/div&gt;
    {% endif %}
  {% endform %}
  </code></pre>