We have Collection of products where not all variants are in stock.
When setting particular variant to 0 Inventory, it shows the SOLD OUT button.
Instead, we need to show a custom message with a link for variants with 0 inventory.
When trying to do this in theme.liquid, you can customize the SOLD OUT message and it will show the custom message only when you refresh the page , but it will revert back to default SOLD OUT when you changing the variants.
Our Goal: Display Custom message for Lab-Grown Diamond and Natural Diamond Variants only (Instead of Add to Cart or Sold Out button, we want to include a custom message to contact us if you would like to purchase this ring with Lab-Grown Diamond or Natural Diamond). The rest Variants that include Moissanite would have standard add to cart button and only variants with Lab-Grown Diamond or Natural Diamond would show the custom message with a link.
P.S. Language trick would not work, because its changing SOLD OUT globally, but we need to change only in one collection.
Thanks in advance!
Hi @Wynn1 ,
you have to alter the JS which is responsible for showing the "SoldOut" or "Add to Cart" and this might be a function _updateVariatnts() in the theme if you are on debut.Further there is no specific code because each theme has different function.
I have a similar issue. I would like to have the SOLD OUT button link to an external site where that item IS in stock. It is actually a $3000 item that I offer but do not ship. Ideally they would see it in my shop, but be sent to the place that does sell it to make the transaction there. It is for a partner of ours.