Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
Solved! Go to the solution
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.
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.
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.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024