Active
Project:
UC Node Checkout
Version:
6.x-2.0-beta8
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2011 at 16:31 UTC
Updated:
8 Jul 2012 at 18:38 UTC
Is there any way to have the new node created without any user input?
So basically user would just click add to cart and then be taken to checkout, but behind the scenes a new node was created.
Comments
Comment #1
millenniumtreeI had this requirement as well.
I used a form_alter hook to print a bit of javascript to auto-submit the form.
The CSS prevents the form from being seen momentarily before it auto-submits.
My module was a heck of a lot more complicated than that, because I had some logic involving attributes, field access rules and an image field that pulls from the user's profile, but that should get you going.
Comment #2
peterx commentedI have a need to completely skip the form before purchase. I tried the option
When the option is off, the node is not created. I suspect it is because some fields are required and are not filled out.
Comment #3
stewart.adam commentedYou can use node_save() to programatically create nodes (example here), but keep in mind that it will do only that - if you're wanting to integrate this with node checkout or implement your own solution, you'll need to relate the cart item to the node manually.