Closed (won't fix)
Project:
UC Node Checkout
Version:
5.x-1.0
Component:
User interface
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2009 at 23:09 UTC
Updated:
19 Apr 2011 at 22:55 UTC
I have been attempting to figure this out. When a user purchases a node and the checkout process is complete, the node is published. Now at that point when the user goes to edit the node (which is required in this use case) they are redirected to the cart after submitting the node-edit form. Is there a way the user could just be able to save the node at the point of it being submitted rather then redirected to pay a second time for the node?
Thank you for your assistance in advanced.
Comments
Comment #1
farald commentedMaybe its as easy as allowing users to " edit own paynodes " in the permissions settings?
Comment #2
ygg commentedAlready have tried that, but it appears it does not work that easy.
Comment #3
ygg commentedComment #4
gregglesThis seems like a bug to me.
However, I'm unable to reproduce the behavior that you describe.
Comment #5
glennnz commentedThis is happening for me too.
Editing a node creates a new node, and adds another product to the cart.
Thanks
Glenn
--UPDATE--
Line 205 of uc_node_checkout.module changes the behaviour of the submit button:
I have tried redefining this in a custom module in a hook_form_alter with:
but this doesn't fix the problem.
Then in uc_node_checkout.module I tried:
No luck there either.
--FURTHER UPDATE--
I can't see why this is happening.
Lines 592 - 602 of uc_node_checkout.module are:
I tried adding:
with no luck either.
:-(
Comment #6
glennnz commentedOK, a workaround.
I didn't want a new node to be created, so I created the function below that is run when the update button on the ode edit page is pushed.
It takes the unedited fields (in my case this was easy, I had most of them restricted anyway) and passes them to the new node, then deletes the old one.
It's very specific to my use-case, but it works....
I tried to use node_delete($nid), but that won't work for some reason.... Maybe to do with the node_load inside node_delete?
Anyway, my code:
Good luck out there....
Glenn
Comment #7
systematic commentedLine 408 of /modules/uc_node_checkout/uc_node_checkout.module seems to be the problem here.
The code checks to see whether the redirect option is enabled and whether or not the user has edit permissions for that content type. It does not differentiate between a new node or a node already created. It does not differentiate between a completed order or an order in progress.
As a starter I have edited the module so that ONLY newly created nodes (which do not yet have a node id) redirect to the cart.... I still have to figure how to differentiate between a node with order complete and one which is only part way through checkout ....
just add a condition to the line 408 : && !$form['nid']['#value'] so it becomes
Comment #8
gutomec commentedSomeone solve the problem of Ygg? I need to users pay to edit the node too, but version is 5.x.
Thanks.
Comment #9
fletch11 commentedanyone figure this out yet - still getting duplicates if I go back at checkout and re-submit.
Thanks
Comment #10
aidanlis commentedI'm not supporting 5.x, if someone provides a patch please feel free to reopen the issue.