spree_related_products icon indicating copy to clipboard operation
spree_related_products copied to clipboard

How to add related products for product without variants?

Open jumski opened this issue 9 years ago • 2 comments

I have a hard time understanding how this should work. The "Related products" tab under product edit allows to search only for variants.

How to add related products for a Product that has no variants? It does not show up in the autocomplete of course, because it hits the variants index.

Thanks Wojtek

PS I'm on spree 3-0-stable branch for both spree and spree_related_products

jumski avatar Jun 28 '15 20:06 jumski

I made multiple invalid assumptions and forgot that variants does not have a name, so search for variants still searches products table.

The reason why i do not get any results is because products table contains empty string for the name column, because i use spree-i18n which makes translations of columns (the original name is there).

Not sure how to fix this, would love to just disable the model translations. Will update on this, and if necessary issue a PR that will make it work with globalize.

jumski avatar Jul 02 '15 20:07 jumski

We're using this extension in our store and we were seeing the same thing.

Even though the search box allows to search for variants, picking one of the variants ends up adding the variant's product as a related product. Which is fine, except that searching for variants is confusing, specially if you have more than one master variant per product.

The real fix would be to modify the search box so it shows products (which are the one that are really being added after all) instead of variants.

bvalentino avatar Jul 16 '15 13:07 bvalentino