When using the Add option in related product settings, items specified by node edit form do not take precedence.
example: I have a product with 4 related products specifically selected by node edit form. Add option is selected in settings and Number to display 5 set in block. when I view the product I only see one or two of the specifically related products and the rest random from taxonomy. also even the one or two are randomly mixed in with taxonomy items, not displayed first.
I filed this as a bug because the behavior does not seem to make sense based on the option
Add: Displays products specified by Node Edit Form, plus nodes related by taxonomy, then randoms if needed.
To me it seems the behavior should be to first fill the block with any specifically selected, then fill up remaining slots based on taxonomy, and finally fill any remaining slots with randoms.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | cron-comment.patch | 661 bytes | torgospizza |
Comments
Comment #1
torgospizzaI just committed a new version to Dev that addresses this. Seems to work well in testing. Please give it a shot and let me know if anything breaks for your setup.
It'll be in the August 29 dev.
Comment #2
Rainman commentedWell, it looks like the associations are presenting as should be now, but Accckk! all of the images are now the default. dunno if this is at all related or a separate bug introduced in the dev. trying to see if I can jigger the settings to bring back the correct images.
under Product imagefield to use: I now have two fields that both say "Image"
Comment #3
Rainman commentedAh. I should have finished testing. I selected the second "Image" and still default, went back to the first one and now correct images display,
Comment #4
torgospizzaYeah that was a new feature introduced in a previous Dev. You got it back to normal though, yes?
Also I had to fix the "Override" method of including taxonomy-related nodes. It was behaving the same way as "Add them". So that should be fixed in the next Dev.
Please test some more and if everything looks good I'll release a shiny new stable this weekend! :)
Comment #5
Rainman commentedYeah by selecting the second Image choice and then going back to the first (both named Image) then the correct images came up. not really intuitive for some hopefully constructive criticism. anyhow, that is really a different issue probably in a different thread.
As for the issue this one was opened up for, it appears resolved now. I will test the newer dev when it hits. it's a good weekend for that as I finish testing for Ubercart 2.0-rc6 upgrade.
Comment #6
torgospizzaCoolness.
Yeah I wish there was a better way to handle the upgrade path. Basically there's no way for me to get the information with regard to what image preset they were using, unless they were using the default for that product type (or the default field_image_cache field). What I've got in there should at least allow for a fairly smooth upgrade. You probably didn't have to switch to one and then the other - probably just submitting your form would've fixed it.
Also in the new Dev that's getting packaged, I added the field_name to the label in that dropdown. So instead of just "Image" it says "Image (field_image_cache)" etc to help disambiguate.
Comment #7
torgospizzaComment #8
Rainman commentedSorry tP. had to bring this one back active. The latest dev August 30 broke all taxonomy items.
When I installed the latest dev, went to the admin page and saw:
Upsell term array was updated.
You need to run cron to build a list of products related by taxonomy.
ok, so clicked on cron and got:
Upsell term array was updated.
Cron ran successfully.
Cool. but now no items by taxonomy at all anywhere. changed the option to Override them, turned on suppliment, nada. can't get any items but those specified on node form now.
Comment #9
Rainman commentedwhow, and no sooner do I post and that version reverts ?^).. guess your on it!
btw, image selection much clearer now and did not have to do anything funny this time, or even submit the form once. though that may have taken from previous.
Comment #10
Rainman commentedok went to the 'reverted' version currently on the dated august 29, issue still persist. dunno if this happened from going to the aug 30 version or if the is an intermediate since the last aug 29 version I used.
Comment #11
torgospizzaGah! Yeah, I found the issue. I thought I had fixed this. Check out the diff here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/uc_upsell/u...
At line 279 is this condition:
Make it just:
I had seen that and caught it in my local dev but didn't commit the fix. Try that (with the latest dev) and let me know if it works. I also just committed the fix to Dev which should run again later today.
Damn. Sorry bout that!
Comment #12
Rainman commentedYeap, that's it. working as expected with that mod, looks good.
I had gone back to the aug 26 dev then applied this latest and the mod. a couple of observations: The images did all reset to the default again. I went into the form and simply hit Save Settings, this restored the correct images - Image (field_image_cache) is what was selected already.
also the behavior with taxonomy related items has changed somewhat in that before when I went in as admin (no caching), and I viewed a product and refreshed, then the related items displayed would change every refresh. now it is always the same items although the order does change around. I'm guessing this is due to the caching now implemented, it's a good thing.
Comment #13
torgospizzaWell the caching is the same, but the reason you were getting more randomized products is because it was ignoring how many were already in the array (coming from the node's chosen Related Products first). The related items by taxonomy will still be random based on the term, though.
Hopefully this will be the end of the issues for a while and I can release a new stable version. W00t!
Comment #14
torgospizzaComment #15
Rainman commentedWhup. found another issue. same as was corrected in #11 but for the cart, no taxonomy items showing up in cart.
Comment #16
torgospizzaOkay, I'll take a look. It should be using the same code, though. Hmm..
Comment #17
torgospizzaI found the issue and I'm fixing it in the next dev. Thanks for letting me know :)
Comment #18
Rainman commentedSure thing! installed latest dev 2009-Sep-01, confirmed issue resolved.
Comment #19
Rainman commentedOne last thing on this and the related issue.
the message shows up quite regularly on my site: Upsell term array was updated.
I can live with that, but can it be restricted to just the admin pages? I found this message shows up even on my front page for anonymous users, definitely not desired behavior.
Thanks!
Comment #20
torgospizzaThat shouldn't happen... you should be the only one seeing it. Perhaps you're seeing it after logging out as an admin? Although I guess it depends on how your crontab is setup... I think I'll just comment that line out to be safe.
Use this patch to fix it.
Comment #21
RikiB commentedThanks for that patch. Everyone was seeing this message with each forum post or anything like that.
Comment #22
torgospizzaWow, really? That's pretty strange - I wonder if there's a reason why? I guess it would depend on a site's cache settings?
Maybe I'll release another stable just with this change so that people can update and get rid of that... I imagine it'd be pretty annoying.
Comment #23
torgospizzaOnce the new Dev version is created, please give that a try. I want to release it as a stable but I'll wait until I get some feedback. Keep in mind that it changes the way the block looks - it adds a checkbox and a single Submit button to include the Upsell products along with the current product you're looking at.
Comment #24
Rainman commentedThanks for your quick response addressing this. Well for being very responsive with everything on this module really, very much appreciated.
I figured it should only be admin seeing the messages so wasn't really sure at first. but then saw it when using a different browser not logged in and on the front page is when I knew it was an issue. Frankly glad I wasn't the only one.
I just manually commented the section for now, will give the dev a try when it post.
Comment #25
Rainman commentedWell I've taken a look at the dev, and the comment on that set_message of course takes care of that issue. Otherwise I believe there are a couple of new items. the issue for block showing for roles I hadn't seen affect my config but would want it there to be on the safe side.
The multibuy_form just doesn't work in my config at all .. I'll post my thoughts on that over in that thread.
Comment #26
torgospizzaOkay so I've released a 1.18 that fixes the "Upsell array" issue and reverts to the 1.16 functionality - that is, it doesn't include any of the multibuy stuff. So I'd say for now you can use that, and I'll continue working on the Dev until I can get a multibuy form that works with attributes (something that I haven't got to yet).
Comment #27
torgospizzaGoing to close this now since this issue is fixed. Continue discussing the "Multibuy" functionality in #409138: Easily add upsell products to cart with the product - thanks!