Skip to content
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

CSV Product import #25

Open
maceck opened this issue Dec 13, 2012 · 25 comments
Open

CSV Product import #25

maceck opened this issue Dec 13, 2012 · 25 comments

Comments

@maceck
Copy link

maceck commented Dec 13, 2012

when we import products via csv the group NOT LOGGED IN is not set.
All other groups are set correctly, only when we import groupskatalog2 "NOT LOGGED IN"
this value is not set correctly?

@Vinai
Copy link
Owner

Vinai commented Dec 13, 2012

Which method of import are you using? Dataflow? ImportExport? Third Party?
Also, which version of Magento and of the extension are you using?

My guess is that the group isn't being set because the value for NOT_LOGGED_IN is 0. Maybe the import script treats that as a non-value and skips it.

@maceck
Copy link
Author

maceck commented Dec 13, 2012

method is importExport, Magento 1.7 .0.2, Netzarbeiter_Groupskatalog2 0.1.6 (beta)

@maceck maceck closed this as completed Dec 13, 2012
@maceck maceck reopened this Dec 13, 2012
@Vinai
Copy link
Owner

Vinai commented Dec 13, 2012

Please update GroupsCatalog2 to the latest version (0.2.4) and try again.

@Vinai
Copy link
Owner

Vinai commented Jan 7, 2013

Any update on the issue?

@maceck
Copy link
Author

maceck commented Jan 7, 2013

the import does not work properly, so we changed the default group settings to not logged in to start with our shop.

@Vinai
Copy link
Owner

Vinai commented Jan 7, 2013

Have you updated the extension to the latest version (0.2.4)?

@maceck
Copy link
Author

maceck commented Jan 7, 2013

yes of course, as you wrote in your last email.

@Vinai
Copy link
Owner

Vinai commented Jan 7, 2013

Thanks for the update, I'll have to debug why the customer group id 0 (NOT_LOGGED_IN) causes trouble during the ImportExport module processing.

@stevejones20
Copy link

Just for information - I've just tried importing and having the same issue.

If my product in the csv contains these in the groupscatalog2_groups:

NOT LOGGED IN
General
Wholesale
Retailer

I end up with these selected in the product:
[ USE DEFAULT ]
General
Wholesale
Retailer

Magento Version: 1.7.0.1
GroupsCatalog2 version: 0.2.5

Thanks
Steve

@Vinai
Copy link
Owner

Vinai commented May 17, 2013

Thanks for the update! This issue is next on my free-stuff todo list. I've got to look into it, hopefully within the next couple of weeks I'll find a little time.

@Vinai
Copy link
Owner

Vinai commented May 25, 2013

I haven't forgotten about this, I'm just super busy with preparation of an upcoming conference. After that is done I'll have time to look into the CSV import.

@harkanik
Copy link

harkanik commented Jan 7, 2014

I have make a workaround, the import core set NOT LOGGED IN at id=-2

when validate customer groups ids at Customergroups.php in Model/Entity/Attribute/Backend

I have add a simple change of id from -2 to 0

 // validate all customer groups ids are valid
    foreach ($data as $key => $groupId) {
     if(-2 == $data[$key]  ) {$data[$key] = 0;}
        if (!in_array($groupId, $customerGroupIds)) {
             unset($data[$key]);
        }
    }

@Vinai
Copy link
Owner

Vinai commented Jan 9, 2014

Thank you for your comment @harkanik.
Its very strange the NOT LOGGED IN group is assigned the value -2, which actually is used for the setting [ USE DEFAULT ].
Both entries, [ USE DEFAULT ] with the ID -2 and NOT LOGGED IN with the ID 0, should be present in the available options.
Which import mechanism do you use please?

@Lennerd320i
Copy link

@Vinai If I try to upload via the Import/Export module, the NOT LOGGED IN group is assigned with the -2 value.
Along with this I do have an additional question. I'm using a Multi Store setup (one in Dutch and one in French) who share products. So the description changes. If I upload via a CSV file (import/export module), having groups assigned to the base entity (NOT LOGGED IN, General, Retailer) and leave the groups blank for the other store view, the system should take over the options from the Original entity (like it does perfectly for the images etc), but yet the Groupscatalog2_groups field being empty, it is being uploaded with the value 0 (since the change proposed by harkanik) or -2 (without harkanik's change).

@Vinai
Copy link
Owner

Vinai commented Feb 12, 2014

Thanks for the update @Lennerd320i - I really have to takle this one soon!

@henleyt
Copy link

henleyt commented Apr 23, 2014

I finnally had csv import working. Along with the @harkanik workaround, I had to work around the why of another problem. In the CSV file, line 1 being the one with column tags "sku,_store,groupscatalog2_groups" don't put anything on line 101, 201, 301, 401 and so on. if you have a product that overlap those lines in the csv, insert lines with only ",," from the end of the last product description until the next starting one at line 102, 202, 302 and so on.

This was an issue on the 0.2.8 vers. as well as the last master commit 0.3.5

@Vinai
Copy link
Owner

Vinai commented Apr 24, 2014

Thanks for the info @henleyt . That bug you describe is related to the way the core code processes the import in bunches. It happens independently of my extension.

@henleyt
Copy link

henleyt commented Apr 24, 2014

This seemed to me so because I haven't witnessed the same behavior with the import of the main catalog CSV which contains every other product info including group pricing. So it may be an issue with 3 colums csv, or more than 10 rows informations per sku. I understand it's probably core related. May be valuable to your customers still. Thanks for your work!

@Vinai
Copy link
Owner

Vinai commented Sep 2, 2014

Did you reindex the groupscatalog indexes after installation?
I don't know Magmi, do they emit the regular product save events? And the
indexer triggers?
Which version of Magento and the extension are you using?

@ecin1resp1
Copy link

Vinai - I did not reindex after each update, which appears to be required. I deleted my previous comments on this issue after figuring that out. I'm surprised you hadn't heard of Magmi, seems to be pretty popular among people doing mass product updates/inserts. FWIW it appears to be compatible with your plugin as it is currently working on those products.

@Vinai
Copy link
Owner

Vinai commented Sep 2, 2014

I've heard of MAGMI, I just never worked on a project using it.
After an initial reindex after installation, it is not required to reindex if the products where created through the Magento admin interface. Since it seems you will have to reindex after each update via MAGMI, that means they don't trigger the indexer events.
Is this issue resolved for you now? Or is there still something open?

@ecin1resp1
Copy link

MAGMI does have a plugin which lets you reindex, so I will try that and see if it works.
Currently, any time I make a change in the extension settings a re-index was required, but I can confirm that is needed for even non-MAGMI products.. So far the extension seems to be working for me, but I will keep you updated if there are any cases like this in the future.

Thanks for your quick response, it is much appreciated.

@ConnDublin
Copy link

I have an issue with standard ImportExport function in Magento 1.7 .0.2, Netzarbeiter_GroupsCatalog2 v0.3.5. I am using Import CSV to update the product name(s) of stock items which already exist and have been assigned values in the "Show to Groups" selection area. When I use a really simple CSV import with just sku, name the name is correctly updated, but the value in "Show to Groups" is reset to [Use Default]. After each import, I re-index ALL files and flush the cache.

I can overcome this bug by including the field groupscatalog2_groups and the categories each product had already been assigned in the import CSV.

What I would expect is that if groupscatalog2_groups (or any) field is left out of the imported CSV file, that property of the sku is not changed. Put positively, if an import CSV includes the sku (required) and another field, ONLY that field should be impacted by the import. At the moment, any such import resets the "Show to Groups" setting.

@Vinai
Copy link
Owner

Vinai commented Jan 8, 2015

Thanks for your report and the really good description of the issue.
I'm currently quite busy, but hope to be able to change the behavior accordingly during one of the next few months.

@VinceTheDude
Copy link

Relying to the initial issue of this thread that the customer group NOT LOGGED IN (ID=0) ist turned into USE_DEFAULT (-2) is because you're checking in Netzarbeiter_GroupsCatalog2_Model_Entity_Attribute_Backend_Customergroups line 43 if $data is set. if you have only the NOT LOGGED IN group set data is interpreted as false (0) and therefore it is overwritten with -2.

Overriding this model and checking for explicit false helped me to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants