Needs review
Project:
UC Upsell
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2010 at 23:45 UTC
Updated:
28 Apr 2012 at 19:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
torgospizzaI believe the attached patch fixes the issue. It should only be returning modules of the type that are specified in the config settings. This is why you are getting products that don't even share related taxonomy terms.
Let me know if this helps.
Comment #2
mitrpaka commentedPatch in #1 helps but doesn't resolve issue completely.
There seems to be issue in IF block statement of "if ($config['global']['restrict_terms'] && $config['global']['restrict_terms'][0] != 0)" in uc_upsell_get_tids_for_intersect() as $config['global']['restrict_terms'][0] exists only when "Do not restrict by terms" is selected from the list ... and thus, current implementation does ignore related items by taxonomy completely!
Patch attached resolves the issue. There is one caveat however, if "Do not restrict by terms" is selected then it overrules all other selections in the restricted terminology list.