Making a Special Order Button

Highlighted
New Member
1 0 0

Hello, I have been trying to make a new button on a product page that when a product is set to continue selling but has no stock to show 'Special Order' on the button instead of Buy Now. Basically a way to tell the customer its not instock but available to order.

 

I am using the Empire Theme from Pixel Union

 

I have this code here at the bottom of the product-form.liquid file that I have played with:

<button
			class="product-form--atc-button {% unless selected_variant.available %}disabled{% endunless %}"
			type="submit"
			{% unless selected_variant.available %}disabled{% endunless %}
			data-product-atc>
			<span class="atc-button--text">
              {% if selected_variant.inventory_quantity <= 0 %}
					{{ 'product.buttons.special_order' | t }}
              {% else %}
              {% if selected_variant.available %}
              {{ 'product.buttons.add_to_cart' | t }}
              {% endif %}
				{% else %}
					{{ 'product.buttons.sold_out' | t }}
				{% endif %}
			</span>
			<span class="atc-button--icon">
				{%- include 'icon-spinner' -%}
			</span>
		</button>
	</div>
</form>

I can sometimes get the button to briefly show but when I select another variant that has stock and go back to the out of stock item it just says Buy Now.

 

I'm working on an offline version of the theme as the site is live, you can find an example product here: https://alansbmx.com/collections/grips/products/animal-edwin-v2-flangeless-bmx-grips?variant=3030439...

 

Any help would be greatly appreciated. I've looked all over but as its not a shopify theme I've been getting confused with things.

 

Thanks, Tom G

0 Likes
New Member
1 0 0

weldone.......

http://list.com.pk/

0 Likes