I am building a store that will have some items for pre-order. I tested some code to the button buy-button.liquid thinking that this would apply throughout the entire store but this seems to only apply to the product layout, unless I missed something. I would want this change to apply to also any collection sections (such as front page collections or other collections that it would be part of such as a mixture of pre-order and non-pre-order). What part of the theme can be edited for this change? I am using the Craft theme, and am using the logic that if a product has the tag pre-order then instead of ‘Add to cart’ it will instead show ‘Pre-order’. I want to use this method as there will be only a certain amount to purchase of these pre-order items and once that amount is over it will then show ‘Out of stock’ like normal out of stock flow. Due to this the option ‘continue allow order if out of stock’ would not work I believe. Thanks for any help on this.
Topic summary
Goal: Change “Add to cart” to “Pre-order” across the store when a product has a pre-order tag, while preserving normal “Out of stock” behavior once a limited pre-order quantity is reached (Craft theme). The Shopify setting “continue selling when out of stock” is not suitable.
Findings:
- Editing buy-buttons.liquid only impacts the product page button.
- Collection pages (including Featured Collection) use separate “Quick add” buttons that do not inherit from buy-buttons.liquid.
Where to edit:
- For collection tiles/Quick add, modify card-product.liquid to implement the tag-based label change.
- Product page logic remains in buy-buttons.liquid.
- Different sections/snippets have their own button markup; there isn’t a single global button template for the entire theme.
Outcome/Status:
- Resolved by identifying card-product.liquid as the correct place for collection buttons.
Actionable next steps:
- Add the pre-order tag check and label swap in both buy-buttons.liquid (product page) and card-product.liquid (collection tiles).
- Review other section-specific snippets if they render additional buy buttons.
Hi,
Thank for replying. When making any changed to the buy-buttons.liquid it only makes changed on the product page itself but if the Quick add option is on for any collections (such as Featured Collections) then the button on their still says ‘Add to cart’. What should I edit to change the ‘Add to cart’ to pre-order for collection items on the front page? Thanks.
I found out how to edit the front collection (such as featured collection) section. I initially though that the buy-buttons.liquid would handle all the buy button that say ‘Add to cart’ but this is not that case. Each section such as collections has their own buttons for them that does not rely on the buy-buttons.liquid template. For collections the way to edit the button would be in the card-product.liquid file. Would have been nice if their was one button layout for the entire store but it seems they keep them separate.