Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm currently working on a project that requires the user to only process payment for node creation for certain data conditions on the node itself. I didn't see a way to do this with the module, so I would like to propose a modest patch that allows other module node form submit handlers to stop submission. I will attach a patch shortly.
Would you consider adding this to the module? Or is there another way to achieve what I'm trying to do?
Comment | File | Size | Author |
---|---|---|---|
#1 | commerce_node_checkout-per_node_override-1930630-1.patch | 741 bytes | jemond |
Comments
Comment #1
jemond CreditAttribution: jemond commentedPatch attached.
Comment #2
mstef CreditAttribution: mstef commentedThis got accomplished in a similar way by the means of another change to the module.
Grab the latest dev or checkout from the repo. For admins only, there is a checkbox to skip adding the node to the cart (see commerce_node_checkout_node_form_submit() and commerce_node_checkout_field_attach_form()). You can override the form values and set 'commerce_node_checkout_skip' to 1 and it will skip adding it to the cart. You'll also just have to publish the node.
Does that work?
If not, reopen please.