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
- 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.
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
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024