Hi All.

I have products categorized using taxonomy, and they are being listed using the taxonomy_content module. The problem is the products has sub-products and all the nodes with the variations are being shown.
I need to display only the main product and not the sub-product.
Can anyone help out pls

Comments

Zane Dog’s picture

Hey, I asked a similar question here and got no answer. But I did get this to happen by making the subproducts module ignore the published/unpublished status of a node, and then unpublishing all the generated variation nodes.

It's not an ideal solution, because it means that I now can't eliminate a variation by unpublishing its node. But it does what I need it to do for now.

I changed the query in subproducts_get_child_attributes, at around line 1845 in subproducts.module, from this

$result = db_query("SELECT a.aid FROM {ec_product_attribute} a INNER JOIN {ec_product} p ON a.nid = p.nid INNER JOIN {node} n ON p.nid = n.nid WHERE n.status = 1 AND p.pparent = %d", $node->nid);

to this

$result = db_query("SELECT a.aid FROM {ec_product_attribute} a INNER JOIN {ec_product} p ON a.nid = p.nid INNER JOIN {node} n ON p.nid = n.nid WHERE p.pparent = %d", $node->nid);

rudolphp’s picture

Thanks for your post. This is what I did.

http://drupal.org/node/69638

its works for me well now. I have another problem that I would like to solve. how are you managing the admin?
I dont want the title to have the variations attributes attached to it. Example shirt XL. I just want it to be search. Also the prices, how are you manging the edit of the prices. The problem for me is I want to make the admin as simple as possible, because my client does not have much user experience.

Best Regards
Rudy

rudolphp’s picture

Thanks for your post. This is what I did.

http://drupal.org/node/69638

its works for me well now. I have another problem that I would like to solve. how are you managing the admin?
I dont want the title to have the variations attributes attached to it. Example shirt XL. I just want it to be search. Also the prices, how are you manging the edit of the prices. The problem for me is I want to make the admin as simple as possible, because my client does not have much user experience.

Best Regards
Rudy