Download & Extend

Related by taxonomy gives me totally unrelated items

Project:UC Upsell
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

I don't know what I'm doing wrong since I'm new in drupal, but I'm trying to use this module, and I disabled random products and trying to only get related items by taxonomy, but the retrieved items are totally unrelated, I even get items with no tags in common.

You can check it out here: http://laurajoyas.com.ar/product/a115-coraz%C3%B3n
The second title called "Productos relacionados" are the items I would expect upsell module to return. Its made using "similar by terms" module.

Thanks!

Comments

#1

Status:active» needs review

I 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.

AttachmentSize
744456.patch 1.31 KB

#2

Version:6.x-1.21» 6.x-1.x-dev

Patch 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.

AttachmentSize
uc_upsell-related_taxonomy_terms-744456-2.patch 859 bytes
nobody click here