What's your biggest current challenge? Have your say in Community Polls along the right column.

What part of theme to edit to change button wording depending on logic throughout the store.

Solved

What part of theme to edit to change button wording depending on logic throughout the store.

KitsunePoet
Shopify Partner
3 1 0

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.

Accepted Solution (1)

KitsunePoet
Shopify Partner
3 1 0

This is an accepted solution.

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.

View solution in original post

Replies 2 (2)
KitsunePoet
Shopify Partner
3 1 0

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.

KitsunePoet
Shopify Partner
3 1 0

This is an accepted solution.

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.