hook_uc_cart_item has been removed from ubercart 7.x-3.0, which means that the node doesn't correctly link to the order.

This patch fixes the node linking issues and fixes some other bugs as well, so might help someone. It needs some more work for the can_ship operation, amongst other things.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

G Gavitt’s picture

Thank you for this patch! I can confirm it works for solving the non-linking issue for my site running 7.x-2.x-dev of node checkout.

cmseasy’s picture

Status: Active » Reviewed & tested by the community

Worked for me: Status change to rentbtc.
Ready for a new dev release?

yaworsk’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
7.58 KB

Sorry, I don't think the patch totally addresses the issue, the table uc_node_checkout_order_products is never updated even after this patch. It looks like association is only made in the serialized data for the product in the uc_order_products table. This makes it difficult to use the association with other modules, purposes, etc (eg. views).

It looks like the table wasn't updated because the module was relying on the submit op in hook_uc_order but I never found submit getting passed in as the op. I changed it to save since the node associated with the purchase is created immediately anyways.

I also added a delete content setting to the admin settings if the order is deleted. This seemed like it should be there but I recognize it is not related to this issue so I can remove that and reupload the patch if people prefer.

yaworsk’s picture

opps, messed up the patch with the # in the name and left a dsm in there... sorry. Should have also mentioned, this incorporates the fix from here: http://drupal.org/node/1444596#comment-7185340 regarding the attributes error message.

spyderpie’s picture

Same issue here. Will the patch be applied to dev soon?

Thanks in advance,
Julie

yaworsk’s picture

Unfortunately I doubt it. The last commit was from over a year ago. I had contacted the maintainers to see if I could help out with the module but never heard back.

However, the https://drupal.org/project/paypernode module provides a good alternative.

zeezhao’s picture

Thanks for latest patch. I can't remember if this worked on an older version of ubercart, but with a recent ubercart dev and the new patch in #4, the cart is not editable on the checkout page i.e. link cart/checkout

It is editable on cart though. Please can someone confirm?

olisb’s picture

Issue summary: View changes

I can confirm I get the same result as zeehao
the product link points to the edit form of the node on /cart but not on cart/checkout