4

after I updated my magento store to the latest version 1.9.2.1 I get into trouble regarding to the export of products with the dafalow profile export.

With every export I got duplicate entries in my csv file and don´t know why. In my product database I have no duplicate entries. If I use the normal export mechanism with "export -> export products" I don´t get duplicate sku entries.

Does someone has the same issue with the dataflow profile?

I just created a new profile with only the sku in it.

<action type="catalog/convert_adapter_product" method="load">
    <var name="store"><![CDATA[0]]></var>
    <var name="filter/type"><![CDATA[simple]]></var>
</action>

<action type="catalog/convert_parser_product" method="unparse">
    <var name="store"><![CDATA[0]]></var>
    <var name="url_field"><![CDATA[0]]></var>
</action>

<action type="dataflow/convert_mapper_column" method="map">
    <var name="map">
        <map name="sku"><![CDATA[sku]]></map>
    </var>
    <var name="_only_specified">true</var>
</action>

<action type="dataflow/convert_parser_csv" method="unparse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
</action>

<action type="dataflow/convert_adapter_io" method="save">
    <var name="type">file</var>
    <var name="path">var/export</var>
    <var name="filename"><![CDATA[test.csv]]></var>
</action>

Result of my csv file

Result of my magento database in admin

At the moment I have no idea how to solve this...

Small example with my csv export:

Sample CSV File

  • 1
    If you isolate the duplicate rows, are all the values in all the columns identical (e.g. no store differences)? – Michael Sep 26 '15 at 7:11
  • I had a look at all of my duplicate rows. interesting is, that the second row which is the duplicated one, has no data in all the columns. First row with my example 105 has all data in it. The row direct under my first has no data in the columns. Only the sku column is filled with a value. – Kevin Sep 26 '15 at 11:03
  • @kaska I edited my question and extended it with a sample csv file link where I have two real examples in it. – Kevin Sep 26 '15 at 11:08
  • I'm not sure. Check your settings in the Export All Products screen. Or it could be how a third party extension is handling your inventory (using base tables or not). Or try TRUNCATE dataflow_batch_export; (back up before doing that. – Michael Sep 26 '15 at 11:28
  • 2
    Try this: github.com/baconl/Magento-1.9.2.1-duplicate-sku-fix Its a temporary fix until the magento core team fixes it, – baconl Oct 19 '15 at 14:01
6

Fix from above comment worked.

Try this: https://github.com/baconl/Magento-1.9.2.X-duplicate-sku-export-fix Its a temporary fix until the magento core team fixes it, – baconl

  • app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php from 1.9.0.0-1.9.1.1 doesn't contain the image path export routine that causes the dupe flood on running product dataflow export. Either drop a copy into app/code/local/Mage or create a module to overwrite the unparse() function. – Fiasco Labs May 11 '16 at 5:30
2

The problem comes from a join in the query. I have the same issue, but still didn't resolve it yet. But when I go and export all products I can see that this happens only to products that have many pictures. If we remove this join, the result will be OK or we have to add UNIQUE to the query. You can see on this screenshot what's causing the duplicate rows.

Duplicate rows on Magento Dataflow Export

UPDATE If you don't need images on your export, you can go to app/code/core/Mage/Catalog/Convert/Parser/Product.php. You can override this model and comment from line 515 to 534 If you need images, you have to change this function and not execute this block when only some fields are mapped

  • You are right. I did a check up of min 10 items of my duplicates entries. Every duplicate entry has more than one image.... After I deleted one image, the sku number don´t appear twice. Also strange is following: I have several products in my database which have more than 2 images and with them I don´t have a problem with duplicated sku´s. At the moment I have no idea how to solve it. – Kevin Sep 29 '15 at 11:44
  • Same for me. I've been struggling with this issue for 2 days now – Ali Sep 30 '15 at 8:43
1

When you update to Magento 1.9.2.X you will have this problem. If u use the app/code/core/Mage/Catalog/Model/Convert/Parser/Products.php from a older version of magento it will fix your problem.

You can try using this link, its a temporary fix that uses a older Products.php file:

https://github.com/baconl/Magento-1.9.2.1-duplicate-sku-fix

Keep in mind, this is a temporary fix until the magento core team fixes it in the next version of Magento.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.