Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

CSV Product import #25

Open
maceck opened this Issue · 24 comments

8 participants

@maceck

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
Owner

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

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

@maceck maceck closed this
@maceck maceck reopened this
@Vinai
Owner

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

@Vinai
Owner

Any update on the issue?

@maceck
@Vinai
Owner

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

@maceck
@Vinai
Owner

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

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
Owner

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
Owner

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

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
Owner

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

@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
Owner

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

@henleyt

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
Owner

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

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
Owner
@ecin1resp1

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
Owner

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

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

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
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.