I'm creating a section of my site where users must purchase individual nodes of a certain content type. In an effort to enhance usability, I allow the user to create the node without paying, but then save it as "Unpublished" so it's not yet visible on the site. Then, once the user pays, we'll publish their node. So whenever a user creates a node of a particular type, it should add a Product (which represents the right to post that particular node) to the user's Cart.
I know I can implement
hook_nodeapi() to hook into the node creation event, but how do I add the product to their cart?