I just upgraded from the May 21 dev to the July 31st one and after saving my first association, I received these errors:
* user warning: Duplicate entry '132' for key 1 query: INSERT INTO uc_upsell_products (nid, related_products) VALUES (132, 'a:1:{i:0;s:3:\"128\";}') in /mnt/target03/364990/404037/www.x.com/web/content/sites/all/modules/uc_upsell/uc_upsell_admin.inc on line 586.
* user warning: Duplicate entry '133' for key 1 query: INSERT INTO uc_upsell_products (nid, related_products) VALUES (133, 'a:1:{i:0;s:3:\"128\";}') in /mnt/target03/364990/404037/www.x.com/web/content/sites/all/modules/uc_upsell/uc_upsell_admin.inc on line 586.
* user warning: Duplicate entry '134' for key 1 query: INSERT INTO uc_upsell_products (nid, related_products) VALUES (134, 'a:1:{i:0;s:3:\"128\";}') in /mnt/target03/364990/404037/www.x.com/web/content/sites/all/modules/uc_upsell/uc_upsell_admin.inc on line 586.
I am also no longer seeing the related products thumbnails. I am seeing the add to cart button and price which I didn't have before (and want to get rid of). I am using uc_upsell_render(); on my node-product.tpl.php file and am also using the zen theme if that matters.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | uc_upsell_admin.541218.patch | 3.53 KB | torgospizza |
Comments
Comment #1
torgospizzaI'm not quite sure I understand. You upgraded the module, but you didn't have any associations until now?
Also, can you try the August 1st Dev release? I think I fixed those bugs there, but I could be wrong. Please let me know and I'll see if I can reproduce the issue.
EDIT: I can reproduce the issue. Looking into it now!
Finally, you don't necessarily need to use uc_upsell_render() in your template. You might instead try to add the block (in admin/build/block) and see if that block displays correctly. As far as not seeing the images goes, I'm not sure. Make sure your imagecache settings in Upsell are still correct, as well as the "default image" selection, which I believe is in the Upsell Block's configuration settings. I might move that over to the rest of the Global settings, though.
Comment #2
torgospizzaHere is a patch that fixes the first issue. Regarding the second, make sure you've run update.php and double-check the default image settings in Upsell's block config.
I also committed this to dev.
Comment #3
walden commentedThanks - I upgraded to the latest dev. Ran update.php
Silly me then remembered uc_upsell issue http://drupal.org/node/481074 The images not showing up were the same problem I had in that issue.
So images are now showing.
What's the best way to remove the price and add to cart button for related items?
Comment #4
torgospizzaOh right, that issue I still need to resolve.
You want to remove the price and add to cart button? That kind of defeats the purpose of the block, but the easiest way is to just copy and paste the theme_upsell_pane (I believe) function from uc_upsell.module, put a new one in your template.php file (and rename it TEMPLATENAME_upsell_pane)... then you just need to hunt for the two bits you need and remove them.
Basically you're just overriding that theme function. This is the best way, rather than hacking the module, so that when I come out with a new update you don't have to worry about re-hacking.
Comment #5
walden commentedgreat thanks!
Comment #6
tjb74 commentedI am also getting this error everytime I make an association or edit a node with an association.
user warning: Duplicate entry '2204' for key 1 query: INSERT INTO uc_upsell_products (nid, related_products) VALUES (2204, 'a:1:{i:0;s:4:\"2207\";}') in ..../modules/uc_upsell/uc_upsell_admin.inc on line 587.
The block and associations appear no problem despite seeing this error.
Comment #7
torgospizzaWhich version of Upsell are you using? Have you tried the latest Dev?
Comment #8
tjb74 commentedYes using the latest Dev version.
Comment #9
torgospizzaWeak. Thanks, I'll take a look.
Comment #10
Rainman commentedI have the August 6 Dev installed and am now experiencing this issue. I had been using just taxonomy for related associations, but decided to make some specific associations when the errors showed up.
This shows up with the respective nid of each product I add associations to.
oddly, the items that I added are randomly showing up (not always) even though not related directly in taxonomy. I have the Add Them option selected in Handle Related Products based on Taxonomy:. Otherwise everything seems to be working correctly.
Comment #11
torgospizzaYeah if you turn off "Add Them" (make it "Do nothing") then it should only give you the products that you selected from the form. "Add Them" means, take some random products from the same taxonomy term and add them to the list of related products. But of course they are shuffled so you get a different mix on every pageview.
Does it work this way for you?
Comment #12
Rainman commentedHi, yes if I change to "Do Nothing" it only shows the products that were specifically selected. with "Add Them" I find more of the random products and only one or two of the specifically selected. I guess what I would expect to see is all the selected and then extra slots filled with the randoms.
Comment #13
torgospizzaJust committed a new Dev version that should fix this. Once the packaging script runs, check it out.
Comment #14
Rainman commentedok on this one, no errors but the product display still does not appear as expected (to me anyhow). example I have a product with 4 related specifically selected plus add randoms, 5 upsell items shown. when I view the product I only see one or two of the related products and the rest random.
Comment #15
torgospizzaDo you have it configured to now show any random products, and no products from cart? Those are part of the "block config" settings.
Comment #16
Rainman commentedin block settings:
Supplement with products related to the user's cart is not selected
Supplement with random products in the block is not selected
the randoms shown are from Add: Displays products specified by Node Edit Form, plus nodes related by taxonomy, then randoms if needed. - all related by taxonomy
Comment #17
torgospizzaOkay so you're seeing default behavior then. I guess I misunderstood your issue. Right now it doesn't bother to "fill up" remaining slots, it just randomly throws related-by-taxonomy products in with the products you selected. Normally I think the ones you selected get precedence, though. I'll have to look into this some more. Can you open a new issue since we're no longer on the topic of the original? Thanks.
Comment #18
Rainman commentedOk thanks for the clarification, I really wasn't sure if that was expected behavior or related to the errors thrown when I associated products, the original issue. I did remove all product associations and then re-add them without any further errors, so that issue appears resolved.