What's your biggest current challenge? Have your say in Community Polls along the right column.

How To Implement Add To Cart Buttons on Product List View / Category on Dawn Theme

How To Implement Add To Cart Buttons on Product List View / Category on Dawn Theme

taggedoutco
Visitor
3 0 1

I want to add size selector, add to cart and buy with shop pay or product list / collection pages like this: https://killcrew.co/

 

Does anyone know what code to add and where? I'm on the latest version of the theme. Thank you! 

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
10340 2052 2135

Hi @taggedoutco 

It has option to enable Quick add button in your Online Store > Themes > Customize > Collections > Default collection 

Screenshot 2024-07-04 at 10.53.38.png

- Helpful? Like and Accept solution! Or Support me: Buy Coffee
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Small_Task_Help
Shopify Partner
830 28 75

Hi,

 

At collection liquid

Integrate Size Selector

Code example

{% if product.options.size %}
  <select name="size">
    {% for option in product.options_with_values %}
      {% if option.name == 'Size' %}
        {% for value in option.values %}
          <option value="{{ value | escape }}">{{ value }}</option>
        {% endfor %}
      {% endif %}
    {% endfor %}
  </select>
{% endif %}

For Add to Cart Button

Code example

<form action="/cart/add" method="post" enctype="multipart/form-data">
  <input type="hidden" name="id" value="{{ product.variants.first.id }}">
  {% if product.options.size %}
    <select name="attributes[size]">
      {% for option in product.options %}
        {% if option.name == 'Size' %}
          {% for value in option.values %}
            <option value="{{ value }}">{{ value }}</option>
          {% endfor %}
        {% endif %}
      {% endfor %}
    </select>
  {% endif %}
  <input type="submit" value="Add to Cart" class="btn">
</form>

For Shop Pay Button

Code example

 

{% if shop.metafields.checkout.shop_pay_enabled %}
  <button data-shopify-pay-trigger>
    <span>Buy with Shop Pay</span>
  </button>
{% endif %}

 

 If you still need help you can contact us 

To Get Shopify Experts Help, E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert Agency
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad