We aren’t allowed to sell a certain suppliers products online but still want customers to see what we have in store and sizes available. I had originally created a new product.notavailable template and section a deleted the below code but it doesn’t show the sizes out of stock.
I’m thinking the easiest way to do this would be editing the below code so the add to cart button is disabled for this particular vendor but can’t work out the correct statement to make it work.
Any help would be appreciated!
{% if product.available %}
{{ ‘products.product.add_to_cart’ | t }}
{% else %}
{{ ‘products.product.sold_out’ | t }}
{% endif %}
{% if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}
This probably isn’t the best solution but it seems to be working for me now!
{% if product.vendor == ‘vendor name’ %}
We are unable to sell vendor name via our online store, however we can still assist you via a remote shopping experience. Please chat to our friendly team via the chat box, call us on .....
...
{% else if product.available %}
{{ 'products.product.add_to_cart' | t }}
{% else %}
{{ 'products.product.sold_out' | t }}
{% endif %}
{% if product.vendor == 'vendor name' %}
{% else if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}
hello @Nuffe
This part of code can be placed in product-template-liquid, depending on what theme you are using, some themes vary, but most use product-template.
Now look for the part of the code for the add to cart buttons and place it there. Remember to work on a copy before making a major change.
find {{ ‘products.product.add_to_cart’ | t }}
or {{ form | payment_button }}
and you will find that part of the code..
I have this code, but I do not know where to put it:
I use the prestige theme:)
{% if product.vendor == ‘vendor name’ %}
We are unable to sell vendor name via our online store, however we can still assist you via a remote shopping experience. Please chat to our friendly team via the chat box, call us on .....
...
{% else if product.available %}
{{ 'products.product.add_to_cart' | t }}
{% else %}
{{ 'products.product.sold_out' | t }}
{% endif %}
{% if product.vendor == 'vendor name' %}
{% else if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}