Aligning Quantity Boxes Horizontally

Solved
Highlighted
New Member
7 0 0

Hi,

I'm trying to align the quantity boxes of the variants of the product horizontally. I've shown a screenshot of what it looks like and what I'm trying to achieve. 

Shopify Screenshot.png

I've used the following code to get the quantity boxes. 

 {% assign linklist = linklists['order-form'] %}
           <form> 
     
             {% for variant in product.variants %}
            
      
             {{ variant.title }}  <br />          
             
 
      <input type="hidden"  value="{{ variant.id }}" id="variant-{{ forloop.index0 }}"/>
             
     
<input  type="number" value="0" id="quantity-{{ forloop.index0 }}"style="width:15%;" />
    
              
 
 
        
             <br /><br />  
            
      {% endfor %}
      
          <div class="purchase-section{% if product.variants.size > 1 %} multiple{% endif %}">
            <div class="purchase">
              {% unless product.available %}
              <p>Sold Out</p>
              {% else %}
              <br />
<input type="submit" value="Add To Cart" class="btn" id="submit-table"/>
 
              {% endunless %}
            </div>        
      </form>

Hope someone can help me out! 
0 Likes
Shopify Partner
84 15 19

Hello @tinyyoshi 

 

Can you please share you store link so i can check and help you :)

 

Best Regards
Parth Bhut

............................................................................................................................

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: parth.bhut143@outlook.com
Skype: parthbhut7

0 Likes

Success.

Shopify Partner
84 15 19

Hello 

 

i added code at line number: 162 to 170  & 224 to 228 on this file : 

product-template-no-cart.liquid

 

Please like and accept my solution 

0 Likes
New Member
7 0 0

Amazing, thank you Parth!

0 Likes