Add freebie line item to cart that requires customer input for correct variant

We would like to automatically add a free shirt to the carts of customers who manually add a truck cover to their carts. How can we use Script Editor to elicit the customer’s shirt size so we add the correct free shirt variant to the cart?

I don’t think there is a way of adding new line items to shopping cart using Cart Scripts - they are pretty limited.

You could try using something like “Sales Motivator ‑ Free Gifts”

https://apps.shopify.com/sales-motivator-free-gifts?surface_detail=free+gift&surface_inter_position=1&surface_intra_position=11&surface_type=search

The App store proabably has something that meets your needs or you could develop it yourself.

Thank you, rancet. The app you point to looks promising.