how to add a inout text filed before add to cart button for specific collection's products

Topic summary

A user wants to add an email input field before the “Add to Cart” button, but only for products in a specific collection (Wix templates). The store uses an outdated Shopify Dawn theme.

Solution Provided:

  • Create a metafield named “Display input field” with type True/False
  • Add custom code to snippets -> buy-buttons.liquid that conditionally displays the input field based on the metafield value
  • Enable the metafield only for products that should show the input field

Implementation:

  • One helper (Guleria) provided step-by-step guidance and ultimately accessed the store via collaborator code to implement the solution
  • The solution was successfully tested on a sample product
  • Code uses Liquid templating to check if product.metafields.custom.display_input_field is true before rendering the input field

Status: Resolved. The user confirmed it “worked like butter.”

Follow-up Question: The user also asked about displaying collection titles instead of banner images when metafields are left blank, which would require additional customization.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

do i need redo all the design if i update the theme ? thank you