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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

snowmountain’s picture

I 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.

griz’s picture

FileSize
779 bytes

Having 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<.

griz’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta8
Status: Reviewed & tested by the community » Active
FileSize
1.38 KB

Ok, 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.

griz’s picture

Hmm...
Try this.

vlooivlerke’s picture

thanks, it works

Anonymous’s picture

It looks like this patch is written for the dev version, is that correct?

Anonymous’s picture

Also - seems like I can't run the patch command on my server. Any chance you could attach the patched .module file please?

vlooivlerke’s picture

FileSize
21.57 KB

i used the dev version and patched it manually. it is only a few lines.
but here it is.

griz’s picture

Yep, 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?

GaryWong’s picture

Applying #9 against Node Checkout 6.x-2.0-beta8 and Cart 6.x-2.7, Drupal Core 6.22, resulted in:

mbp15:uc_node_checkout gwong$ patch < node_checkout_nid-1181578-9.patch --dry-run

patching file uc_node_checkout.module
Hunk #1 FAILED at 819.
Hunk #2 succeeded at 751 (offset -86 lines).
1 out of 2 hunks FAILED -- saving rejects to file uc_node_checkout.module.rej
mbp15:uc_node_checkout gwong$ 

I can just manually fix the .module (thanks vlooivlerke ) but thought I'd FYI this...

gary

BenStallings’s picture

Status: Active » Reviewed & tested by the community

Thanks to vlooivlerke for the fix in #8.

mattcasey’s picture

manually patched... it works for me

AaronBauman’s picture

Version: 6.x-2.0-beta8 » 6.x-2.x-dev

Patch #9 applies cleanly against -dev and fixes the issue from the OP.
RTBC, yeah baby!

AaronBauman’s picture

bump.

millionaire’s picture

I'm using 6x2 Beta 8 and all fixed thanks to vlooivlerke :)
Thank you!

stewart.adam’s picture

Version: 6.x-2.0-beta8 » 6.x-2.x-dev
Status: Active » Needs work

Patch 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.

AaronBauman’s picture

seems 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?

mr.andrey’s picture

subscribing...