-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Akeneo 2 product variants doesn't import right way to Magento 2.2 if there is more than one level #168
Comments
I have the same problem:-( |
I stacked on the same issue and it is a real problem for our Magento 2 project. |
I stacked with the same problem and implemented the solution by overriding the method "createConfigurable" in Pimgento\Product\Model\Factory\Import The main idea is to read the same "pimgento_variant" table and for 2 axes firstly find all children "configurable" products and ONLY then from them collect all simple product SKUs into one column "_children" looking into "tmp_pimgento_entities_product". As we can have 1 or 2 axes I use COALESCE to have all results in one column "_children". The SQL query can be optimised, but I hope it idea can help you. I changes 340-348 line ($configurable = $connection->select() ...) to
It was the problem to collect "family" and "_status" by getting the first SKU from calculated "_children" column and because I use variable "@children" and two additional subselects instead of JOIN. I also noticed the problem that we create url_key from v.code that is very bad because the configurable product will be public product and for SEO is required correct URL. I also dislike the current solution that for every configurable product attribute you need to specify it in the Magento Configuration (CONFIG_PIMGENTO_PRODUCT_CONFIGURABLE_ATTR). Would be nice to collect them automatically because in our case we have > 100 attributes and different for each attribute set. So, something can be missed. |
For your comment about the url_key: this might be relevant: #132 |
I had the same issue and made a simple fix for this on my fork. The idea here is to only take the last axis if the parent is not empty. |
Hi,
I have played some time with Akeneo 2 and Magento 2.2 and I can't get product import working right way.
For simple products import worked quite good, but when I import product with variants, there is some problems.
I tried it with Akeneo demo data and empty Magento so this is easily reproducable.
Family "Clothing" has variant family "Clothing by color and size". That variant family have
color
in first variant axis andsize
in second variant axis. Like this:Then I have product model which has that variant family:
When I export those products to Magento, PIMGento creates "Configurable" product to that first variant axis level. Here is screenshot from Magento:
So, it creates "Configurable" product for each color of the t-shirt. That could be acceptable, if it doesn't add that
color
-attribute to configurable attributes. Because of that, when customer tries to add item in cart, they have to choose bothcolor
andsize
. Like this:And this:
Is that behaviour customisable in PIMGento somehow? I can live with "Configurable" product for each color of t-shirt, if that color attribute is not mandatroy to choose.
Best solution is, that PIMGento somehow creates one "Configurable" product, which have both attributes choosable (color and size). Like this example product which I created straight to Magento:
The text was updated successfully, but these errors were encountered: