Hey guys,
Basically on my website for Custom products, I want it to say Configure this PC and everything else to say the standard add to cart. I’ve currently got the button working in that it shows configure this PC for a specifc collection, but I don’t know how to sort the “else” part out.
This below is the code that’s working for it.
{% for collection in product.collections %}
{% if collection.handle == “custom-gaming-pcs” %}
<a
href=“{{ product_link }}”
class=“productitem–link”
data-product-page-link
This is the code below it that shows the normal add to cart:
{% unless recently_viewed %}
{% if enable_quickshop or atc_button %}
{% comment %}
Default button appearance and text
{% endcomment %}
{% assign quick_shop_text = ‘product.buttons.quick_shop’ | t %}
{% assign quick_buy_text = ‘product.buttons.add_to_cart’ | t %}
{% assign quick_shop_classes = ‘productitem–action-trigger button-secondary’ %}
{% assign quick_buy_classes = ‘productitem–action-trigger productitem–action-atc button-primary’ %}
{% if has_variants %}
{% assign quick_buy_text = ‘product.buttons.choose_options’ | t %}
{% else %}
{% if product.template_suffix contains ‘pre-order’ %}
{% assign quick_buy_text = ‘product.buttons.pre_order’ | t %}
{% endif %}
{% endif %}
{% unless product_available %}
{% assign quick_buy_text = ‘product.buttons.sold_out’ | t %}
{% assign quick_buy_classes = quick_buy_classes | append: ’ disabled’ %}
{% endunless %}
{% if enable_quickshop %}
{% if atc_button %}
Can anyone help me?
