All things Shopify and commerce
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!
Hi @taggedoutco
It has option to enable Quick add button in your Online Store > Themes > Customize > Collections > Default collection
- Solved it? Hit Like and Accept solution! ❤️Buy Me 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.
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
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025