product sold

Hello,
I had a product sell that was set for view only. the buy/add to cart button isn’t available on the product so I’m unsure of how it was able to be sold, How can i prevent this in the future.

See https://community.shopify.com/c/technical-q-a/orders-for-products-that-don-t-have-an-add-to-cart-button/m-p/2875062?search-action-id=215820811686&search-result-uid=2875062