Closed (fixed)
Project:
UC Upsell
Version:
6.x-1.15
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2009 at 23:57 UTC
Updated:
2 Aug 2009 at 01:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
torgospizzaCan you upgrade your module? 6.x-1.9 is several versions old. I just committed 6.x-1.15 which should include a previous fix for the issue you're having.
Try it out and let me know. Thanks!
Comment #2
ck9 commentedThanks for your reply. The version I have is actually 6.x-1.15 but the problem remains.
Comment #3
torgospizzaI'm running this version on a live site and can't reproduce your issue. Is there a link you can send me (preferably with admin access)? I understand if you can't.
One thing I would say is to make sure your Node types are configured correctly. You might try double-checking them. Other than that, if you can give me more information as to your config, I can take another look, but as of now I can't reproduce the problem which makes it much harder to troubleshoot.
Comment #4
ck9 commentedHi it's a commercial site so I can't give admin, but I've continued trying to fix this to no avail. I suspect it may be incompatible with one of the other ubercart modules I have installed (Userpoints, UC Node Checkout and UC Node Checkout Published), but I can't test this possibility right now as disabling these would cripple the site.
Comment #5
kenwen commentedHi,
I'm having the same problem as well - the previous version of uc_upsell worked but did not incorporate VAT, the new version doesn't apply any associations.
I have a preview site that I can give access to; please contact me for details
Comment #6
torgospizzaThanks ken, I've sent you an email.
I have checked this on my live site (using the dev version of the module) and still can't reproduce. I have set Taxonomy settings in Upsell to "Do nothing" and added 3 products to Node A, and these 3 products are the only ones that show up - which is the expected behavior.
Upsell should be agnostic to things like UC Node checkout, etc., unless the type of Node you are trying to add doesn't appear in the list of available Node Types.
Did you visit "Node Types" to be sure that your types have been checked? If you make selections in the form but do not check the node types you want to show up, then nothing will be displayed in the block.
Comment #7
torgospizzaThanks ken, I've sent you an email.
I have checked this on my live site (using the dev version of the module) and still can't reproduce. I have set Taxonomy settings in Upsell to "Do nothing" and added 3 products to Node A, and these 3 products are the only ones that show up - which is the expected behavior.
Upsell should be agnostic to things like UC Node checkout, etc., unless the type of Node you are trying to add doesn't appear in the list of available Node Types.
Did you visit "Node Types" to be sure that your types have been checked? If you make selections in the form but do not check the node types you want to show up, then nothing will be displayed in the block.
Comment #8
ck9 commentedI got as far as "set Taxonomy settings in Upsell to Do nothing". Whether I select one product or I select two or three, when I click 'Save' or 'Save and Continue', it doesn't save and there is no association.
Comment #9
torgospizzaKenwen,
Your issue is resolved. You had forgotten to go to admin/build/block and enable the "Upsell items" block. It was set to Disabled; I moved it to the "Content Bottom" region and now it shows up. I checked your "Associations browser" area and the products I added all show up without any problems.
http://lkb.lkbpreview.co.uk/node/11
ck9: You might check your settings for the block as well. I couldn't reproduce the error on kenwen's site either. When I added related products to the node, they saved and I could go back to the Edit form and see them selected in the list.
Please take a look at the screenshots.
Comment #10
ck9 commentedI've removed the module, upgraded to the dev version, re-installed, ran cron, ran update, upgraded all the other modules, etc. etc. but still no success. I've not updated Drupal Core yet (I'm still on 6.10); any idea if that's related?
Comment #11
torgospizzaHmm - it could be but to be honest, I don't think there are any changes to the module that really involved on core. It's pretty much core agnostic.
Can you attach a screengrab of your block and module's global settings?
Comment #12
kenwen commentedHi Eric,
Just tried it and still not working - the only thing I can suspect is that this is somehow browser specific!?
I noticed you're using Safari (and a Mac I guess), running this on a windows based laptop.
Long shot I know but this is weird :)
Comment #13
torgospizzaActually it was Firefox that I took the screenshot with :) So I don't think it's browser specific. Can you find a way to reproduce the issue exactly so I can try again on my end? I mean, if you browse to the node I pointed you to, the node associations are showing up? Those two products are the only ones that I added to that node. And if you go into edit the node, do you see the products still listed in the select box? Because when I edit the node, I do.. :)
What is it you're not seeing or able to do at this point?
Comment #14
ck9 commentedtorgos, is there any chance you could upload a screen capture video of the module being installed and then the associations being made? Looks like you got it working on his server so maybe we're missing something if we can't reproduce that result? Ta
Comment #15
kenwen commentedHi Eric,
Just tried to edit the associations on the product you set up and its definitely not sticking. I see the two that you linked, but any that I try don't work!
It's beginning to seem like something on our machines here - the only doubt that I have is the upsell module was working before
I'll grab a screencast of it and show you exactly what I'm doing. Maybe I should RTFM :)
Comment #16
Rainman commentedJust wanted to throw another into the bucket, happening here too. I add related items and it brings me back to the associations page with nothing listed; go back to the product and nothing is selected. checked the table in mysql, empty. also tried a couple different browsers, no avail.
Comment #17
torgospizzaHmm, very strange. I'm still unable to reproduce this. I'll see if I can monkey around and reproduce the issue, but a screencast would be great. Also a screenshot of your settings etc.
If you're a code-editing person, you might try some drupal_set_messages() during the form_submit process.
Also - I did make a change regarding curly braces lately. If you're using a table prefix (such as "drupal_") you might want to uninstall and reinstall Upsell. Let me know if that is in fact the problem.
Comment #18
Rainman commentedHi tP, well I went ahead and uninstalled, ran cron downloaded again and reinstalled, although I don't believe I have any prefix such as.
without touching a thing this time so everything was still default (well seemed maybe some saved settings) just went straight to the associations and tried, same results.
actually I am not surprised as I just downloaded and installed for the first time this morning.. maybe a piece of information to help you reproduce.
Comment #19
torgospizzaVery, very strange. I'll go through the same process on my test sites and see if I can reproduce it. Thanks for the info.
Comment #20
pieterbezuijen commentedGot this problem as well. I looked into the code (though I'm not an expert on this) and something got my attention.
from 6.15 uc_upsell_admin.inc on line 79:
I thought form-functions had other arguments and looked into a previous version of uc_upsell, where the function is on another place and has different arguments, could this be the cause?
from 6.11 uc_upsell.module on line 167:
Edit: I've tried some 'drupal_set_message'-messages, including one at the start of the function. No messages appear after saving a node.
Comment #21
Marsh57 commentedI have a similar problem. The Upsell block shows, but only for random associations. Associations I make on the edit product page don't show, and if I uncheck show random associations, the block doesn't show at all, even though I have tried to make associations for that product. An ideas?
Comment #22
torgospizzaI'm able to reproduce this now on a clean install. I'll be creating a patch and hopefully committing to dev a new dev release. Not really sure how this code got so bad, but yeah it's pretty unusable at this point.
Stay tuned - and sorry about this!
Comment #23
torgospizzaDon't use this patch! See comments #24 and #25.
Comment #24
torgospizzaPlease disregard that patch. It does not work, even though it was.. Will post another patch once I've tested more.
Comment #25
torgospizzaOkay, this patch appears to be solid. One thing that it doesn't do yet is many-to-many relationships. So for instance, if you edit Product A and attach Product B and Product C to it (in the "related products" select list), the module will add Product A to B and C's list of related nodes as well, but it won't add B to C. For that you'd still need to visit Product B and add C to it from within the Edit form.
I'll work on reinstating that feature, but I figure it's better to fix this bug and have one feature be not working 100% than to not release anything at all.
Please test the patch and let me know the results.
Comment #26
torgospizzaSorry, that was a duplicate of the earlier patch. Use this one instead.
Comment #27
jrchew commentedHey man,
Thanks for writing this patch, I am going to try it out right now. I've never patched Drupal so it may take me a while but I'll let you know how it goes.
Comment #28
ck9 commentedTorgos thanks for this. Any chance you could incorporate the patch into a new release? I normally apply patches manually but the changes here look quite extensive. Ty
Comment #29
torgospizzaThe patch looks extensive but it's not that much, it's rewriting one function and adding a few others. I wanted to write some of it from scratch because I wanted a better handle on the logic I need to invoke. Although I have to say, I'm not 100% sure how the hook_submit function got so borked. I looked through it and none of it made any sense - which makes me think that a merge happened somewhere along the line that I wasn't aware of. Sorry about that.
I committed this patch to Dev, so once the packaging script has been run, download and test out that new version. It should work seamlessly, no database updates required.
Comment #30
jrchew commentedOk, I had to migrate from win to linux to apply the patch which was cool. I'm getting the hang of this open source thing :).
After applying the patch it worked like a charm from the admin end!
I'm still running into a problem though.
I've associated 2 products to another single product, but when I go to view this single product from the website end, it seems as if all of the products in my store are associated with my single product.
Could this be a bug or just a setting that I am overlooking?
Thanks in advance!
Comment #31
torgospizzaAre there items in your cart? Do you have your settings configured to include items associated with items from the user's cart? You might also see what the taxonomy settings are for Upsell products (set it to "Do nothing" to make sure you're only pulling items from the database). Also make sure you have turned off the "random products" inclusion in Upsell settings.
I'll see if I can reproduce this but I don't remember seeing anything similar... I'll keep you posted.
(Also, I'm not sure why Windows couldn't install the patch - you should be able to use TortoiseSVN or TortoiseCVS - or any other type of subversion app - to apply patches.)
Comment #32
jrchew commentedRight on man, It was random products. I missed it in the core settings and the block settings. Fixed now. Thanks a million man!
Comment #33
torgospizzaGlad to hear it worked :) Looks like the packaging script for dev releases still hasn't been run yet - I think it's set to sometime around midnight GMT, so hopefully it'll be running very soon.
Comment #34
torgospizzaFYI: This patch is now in Dev (dated Jul 02). Please test it out - thanks!
Comment #35
Rainman commentedHey tP! glad you were able to reproduce and find the issue.
Applied the patch and all is well on the initial issue, although... when using Related products association, not only won't add B to C but when I then relate C to A and B, B loses it's initial association with A.
new threads created for a couple of other issues that came up. Thanks
Comment #36
kenwen commentedHi Eric,
I managed to get it working once and may have found what triggers it to stop working :)
if you disable then reenable the upsell block it seems to stop upsells from associating again. Needed to uninstall and reinstall to get it going
Ken
Comment #37
kenwen commentedHi Eric,
I managed to get it working once and may have found what triggers it to stop working :)
if you disable then reenable the upsell block it seems to stop upsells from associating again. Needed to uninstall and reinstall to get it going
Ken
Comment #38
torgospizza@Rainman:
Well that's not good at all!
I'll work on patching the B+A+C = -A issue right away.
Regarding the issues, please create other threads for them.
@Kenwen:
I'm really not sure how enabling or disabling a block would have any effect on whether or not associations are made. They are completely unrelated and, IIRC, don't even share any code except when a block is "viewed". I'll look into it but I think it's just a coincidence on your end.
I'd suggest trying the new dev but please let me fix the other outstanding issues that I introduced recently. Thanks!
Comment #39
kenwen commentedHi Eric,
I'm using the latest DEV version - done a bit more investigating and think I've found the problem; the associations I've set up did not work with the intended product but got associated to the product kit that product is part of.
hope that helps!
Ken
Comment #40
torgospizzaI just committed a new version to Dev that seems to resolve all of these issues. I found some inconsistencies with the way the arrays were being handled and so I cleaned them up a little bit. I actually had to revert some of the code in order to figure this out - in the next release I'll try to clean up some of this code some more.
When the dev package gets updated with today's date, please don't hesitate to try it out. I tested it heavily on my test sandbox and everything seems to work. Please give it a shot.
Comment #41
Rainman commentedI have applied the Dev version and all issues appear resolved.. although is it just me or has the associations browser reverted to just opening the product edit instead of how it was before?
Comment #42
torgospizzaI don't see how that's possible, I didn't touch the associations browser :)
Comment #43
Rainman commentedIt's just me, thanks for the confirmation:)
Comment #44
kyutums commentedJust wanted to share that I had the same problem as ck9. The dev version solved it. :)
Comment #45
douglas.a.hatch commentedI am running the latest Dev version. For a given product, I'd like the upsell block to display only those products I've explicitly associated with it via the 'Product Information' page. However, Upsell seems to have a mind of its own, making new associations as I add and configure new products. Is there a way to force Upsell to display on the manually-configured product associations? I know this is counter to the tools stated purpose, but for my particular site I need to create a very controlled product experience.
Thanks!
Comment #46
torgospizzaDouglas, at the moment, no - this behavior is by default. However for you I will create a configuration for this (that is true by the default settings). Please give me a day or so to work this out and I'll post it to the newest Dev.
Comment #47
douglas.a.hatch commentedThat would be great! I think others may find this feature useful as well. My particular use case is this: I sell watch bands and watch faces. On a watch band product page, I only want to display watch faces in the Upsell block, and vice versa. So being able explicitly define the products being shown in Upsell is important.
Thanks!
Comment #48
torgospizzaDouglas, I'm going to move our discussion here: #523854: Configuration options for related product (reciprocal) associations. Thanks.
For now I'm going to mark this issue as "Fixed" since the associations now appear to work for everyone. Once the configuration options are finished I'll commit this to a new stable release.