Yes, add a column to the cart to store that value and then you should be able to check it with an IF statement. Is the field shown for each row in the cart or once at the end if any cart item has that ProductNameID?
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.