Hi,

when checking "Shuffle related and supplemental nodes." at admin/store/settings/upsell, I have page nodes included in the related product, leading to a warning about the add cart form...

I've unchecked it and now that works fine.

cfab

CommentFileSizeAuthor
#5 uc_upsell_core.patch1.4 KBtorgospizza

Comments

torgospizza’s picture

Did you check the "node types" setting in admin/store/products/upsell? There is a "Node types" fieldset that allows you to choose the node types to allow. It's strange that it's filling it up with non-product node types - I've never seen that happen but I'll see if I can reproduce it.

tahiticlic’s picture

Yep, I've checked all my products types (there's only products type listed here, so no way to include page type here).

I've just re-tried to make it fail, and it failed :

Working conf :
Block settings
Enable for : Product pages
Supplement with products related to the user's cart : checked
Number to display : 3
Weight : 20
Supplement with random products : unchecked

Module main settings
Use default message when at least one upsell item is associated. : checked
Shuffle related and supplemental nodes. : unchecked
Handle Related Products based on Taxonomy : override them
Cart Pane - Supplement with random products : unchecked

Failing conf, the same except :
Module main settings
Shuffle related and supplemental nodes. : checked

Well, I don't know how I can backtrace the thing, tell me and I'll do the test.

torgospizza’s picture

So you're sayting that if you only check "Shuffle related and supplemental nodes" - a setting that was previously unchecked - it begins to include Page nodes? That's a good place to start.

tahiticlic’s picture

That's what I say : checking it make page content to be included.

torgospizza’s picture

StatusFileSize
new1.4 KB

I think I found the issue, well at least I found something similar. I was having other nodes added to the array because the $cart_nids variable was set to 0.. I'm not sure if this leads to your issue but it might be.

Here's a patch you can try. Let me know if it helps.

tahiticlic’s picture

Seems to work fine now indeed. I can't tell for sure since it uses random products, but on ten products I browsed, no error (before, I had error every 2 or 3 products).

Thx!

torgospizza’s picture

Status: Active » Fixed

Awesome! Glad to hear it. I'll commit this change to the dev branch and include it in 6.x-1.14.

torgospizza’s picture

Looks like I'm actually still able to reproduce this behavior. I'll be investigating and putting out another patch, I hope.

torgospizza’s picture

Fixed in CVS and in 1.15. It turns out a new $vars parameter I added to an array_merge function was in the wrong place, resulting in values getting inserted that didn't belong in the resolve_associates method.

Issuing a new stable release to show this fixed issue.

tahiticlic’s picture

Good point!
Thx again.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.