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.
The error,
Unable to determine the product class associated with item so the shipping pane is included on this Ubercart display
appears for each item during checkout that is not a uc_node_checkout product.
The attached patch resolves this issue for me.
Comment | File | Size | Author |
---|---|---|---|
#4 | node_checkout_nid-1181578-4.patch | 2.75 KB | griz |
#3 | node_checkout_nid-1181578-3.patch | 1.38 KB | griz |
#9 | node_checkout_nid-1181578-9.patch | 1.4 KB | griz |
#8 | uc_node_checkout.zip | 21.57 KB | vlooivlerke |
#2 | opfix-1181578-2.patch | 779 bytes | griz |
Comments
Comment #1
snowmountain CreditAttribution: snowmountain commentedI have seen the same message for products, and also after creating a product class for products of the new product class type. I have not been using node checkouts YET, so these products were also not uc_node_checkout products.
I do have UC Node Checkout 6.x-2.0-beta8 installed and enabled.
Thanks for the patch - I will be trying it out.
Comment #2
griz CreditAttribution: griz commentedHaving been implemented, the patch above no longer applies. However, I'm getting this problem again. I had a look and there is one tiny error: an "==" operand with only one "=" on line 823.
Patch attached.
-edit- actually, it doesn't work.
Looking into it >again<.
Comment #3
griz CreditAttribution: griz commentedOk, i *think* I've found the problem.
Shouldn't it be
$item->data['node_checkout_nid']
Instead of
$item->data['nid']
?Isn't it meant to be checking that the item is actually a node_checkout product? Otherwise it's just checking that the item has a nid. That will be true, but if the second condition is false it will throw the error, hence getting errors on every product which isn't a node_checkout product.
Comment #4
griz CreditAttribution: griz commentedHmm...
Try this.
Comment #5
vlooivlerke CreditAttribution: vlooivlerke commentedthanks, it works
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedIt looks like this patch is written for the dev version, is that correct?
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAlso - seems like I can't run the patch command on my server. Any chance you could attach the patched .module file please?
Comment #8
vlooivlerke CreditAttribution: vlooivlerke commentedi used the dev version and patched it manually. it is only a few lines.
but here it is.
Comment #9
griz CreditAttribution: griz commentedYep, dev. There has recently been an update. Nothing has changed in the relevent part of the module, but here is another (slightly cleaner) patch anyway.
I know <TR> and Ryan are both very busy people... But any chance we could get this sorted?
Comment #10
GaryWong CreditAttribution: GaryWong commentedApplying #9 against Node Checkout 6.x-2.0-beta8 and Cart 6.x-2.7, Drupal Core 6.22, resulted in:
I can just manually fix the .module (thanks vlooivlerke ) but thought I'd FYI this...
gary
Comment #11
BenStallings CreditAttribution: BenStallings commentedThanks to vlooivlerke for the fix in #8.
Comment #12
mattcasey CreditAttribution: mattcasey commentedmanually patched... it works for me
Comment #13
AaronBaumanPatch #9 applies cleanly against -dev and fixes the issue from the OP.
RTBC, yeah baby!
Comment #14
AaronBaumanbump.
Comment #15
millionaire CreditAttribution: millionaire commentedI'm using 6x2 Beta 8 and all fixed thanks to vlooivlerke :)
Thank you!
Comment #16
stewart.adam CreditAttribution: stewart.adam commentedPatch in #9 may prevent the errors from being output but I don't think that it's correct; it removes the assignment of $uc_node_checkout_product and then references it in the if condition it adds, so that check will always fail.
Comment #17
AaronBaumanseems like most people on this thread would prefer to just remove the conditional altogether.
how about just logging it to watchdog, rather than displaying a user-facing message and fussing with the checkout pane?
Comment #18
mr.andrey CreditAttribution: mr.andrey commentedsubscribing...