Hi Everyone,
I have an issue that maybe someone can shed some light on.
Unless I am incorrect there seems to be a forced 1:1 relationship between the Products and the Variations, especially in regards to the title.
Motivation -
I have two products (lets say two white t-shirts) that are white labeled as companyA and companyB. Both of these shirts are fulfilled by the same physical shirt/sku (say T-1234). Essentially a shared SKU.
So I create the product for companyA with a Title of companyA T-Shirt and add a variation with SKU T-1234. Then I create a product for companyB with a Title of companyB T-Shirt. Then instead of creating a new variation (b/c they both use SKU T-1234) I add an existing variation bringing in the variation I created on companyA T-Shirt.
First (possible) issue -
The inline entity form autocomplete only searches by product title to match the variation (is this by design? Product title matched to variation with generateTitle). This seems counter intuitive given that out of the box variations do not have a title field and (I) would think that searching by variation sku (since its required and distinct) would be more logical.
Second Issue -
So given the first issue, in the add existing variation autocomplete I put in the first product title (companyA T-Shirt) it matches the variation (by original product title) and adds that as the variation (SKU, Price, Image etc. all there).
Now when I go to any of the products they seem to be correct (different titles/descriptions etc. but have the same sku/price) but when I add the "companyB T-Shirt" to the cart I get a line item title of "companyA T-Shirt".
I am a fairly experienced developer and have been poking around the code (firstly to find the field search settings for the autocomplete) but have yet to find a way to circumvent the title issue.
The products and variations are both out of the box default ones that I migrated over from D7 1:1 so this issue did not come up until I tried "sharing" the sku's.
Any help/insight would be much appreciated. Thanks again.
Comments
Comment #2
heyyo commentedI'm in the same situation, I would like to sell prints of painting/photos printed on different mediums(paper, canavas, aluminium...) and different sizes.
So my products are not the image of the painting itself, but the different variations of medium and size.
Each variation has a fixed price.
Ex: Any image printed on canvas of 50cmx50cm will cost the same price.
In Commerce 1.x I was able to set a list of default products selected when creating a new product display.
With the new 2.x architecture, I'm clueless how to realise this, and it seems to be impossible.
Comment #3
bojanz commentedVariations always belong to a single product, they cannot be shared.
We fixed this a few releases back (removing the "Add existing" button from IEF completely).
I wasn't able to understand how #2 relates to the original post.