[Skip to main content](#vessel-content)

#   Bug Exporting products

##

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago [\#108497](#108497) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108497 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")* was created by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")*

Hello,
I think there is a bug exporting all my product:

In the generated CSV file, the column with PARENT_CATEGORY is empty, but on the site, is populated..
I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...

Thanks
Giorgio

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 5 months ago [\#108558](#108558) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108558 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

Hi,

There is no parent_category column "on the site".
Also, that column is not necessary for imports. I don't see why you need it ? It's an optional column which shouldn't change anything.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago [\#108721](#108721) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  Replied by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108721 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

I have used parent_category to import from a CSV my database!

Please look attached images:

[ ![Schermata&#95;2013-06-11&#95;alle&#95;15&#95;49&#95;25.png](/forum/attachment/10576) ](/forum/attachment/10576 "...e&#95;15&#95;49&#95;25.png")

[ ![Schermata&#95;2013-06-11&#95;alle&#95;15&#95;50&#95;44.png](/forum/attachment/10577) ](/forum/attachment/10577 "...e&#95;15&#95;50&#95;44.png")

Now I need to export the same structure, what I need to do?

thanks

Giorgio

- [ ![Schermata&#95;2013-06-11&#95;alle&#95;15&#95;49&#95;25.png](/forum/attachment/10576) ](/forum/attachment/10576 "...e&#95;15&#95;49&#95;25.png") [ ](/forum/attachment/10576?download=1 "...e&#95;15&#95;49&#95;25.png")
- [ ![Schermata&#95;2013-06-11&#95;alle&#95;15&#95;50&#95;44.png](/forum/attachment/10577) ](/forum/attachment/10577 "...e&#95;15&#95;50&#95;44.png") [ ](/forum/attachment/10577?download=1 "...e&#95;15&#95;50&#95;44.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago [\#108726](#108726) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  Replied by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108726 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

(as described in documentation)

"You could also mix both products and categories in the CSV:
product_code,parent_category,categories
,main category 1,sub category 2
my_product_1,main category 1,sub category 2"

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 5 months ago [\#108728](#108728) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108728 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

The export already export the category structure. There is no need for the parent_category column to be filled for the products in the exported CSV. It work work like you want when you import it back.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago [\#108737](#108737) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  Replied by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108737 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

Hi,
I think that I'm doing some errors, because if I import the CSV exported from Hikashop, I lose the main category!
Exactly "CASSE AMPLIFICATE &amp; ACCESSORI"

I can't find the words "CASSE AMPLIFICATE &amp; ACCESSORI" in the CSV exported!

Initially I've create the main categories using "parent_category"!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago -  13 years 5 months ago [\#108740](#108740) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  Replied by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108740 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

To see the problem, follow please this steps:

Import fromt text data this code:

parent_category,categories,product_code,product_name,price_value,price_currency_id,images
CASSE AMPLIFICATE &amp; ACCESSORI,ACCESSORI PER CASSE AMPLIFICATE,BAG12,CUSTODIA IN TESSUTO PER PROSOUND 12,"19,97",EUR,BAG12.jpg
CASSE AMPLIFICATE &amp; ACCESSORI,CASSE AMPLIFICATE,C6AN,"DIFF AMPL 2VIE NERO 60W WOOFER6.5"" CE ROHS","160,5",EUR,C6AN.jpg
CASSE AMPLIFICATE &amp; ACCESSORI,CASSE AMPLIFICATE,C8AN,"DIFF AMPL 2VIE NERO 80W WOOFER8"" CE ROHS","213,5",EUR,C8AN.jpg
CASSE AMPLIFICATE &amp; ACCESSORI,CASSE AMPLIFICATE,E5AB,"DIFF.AMPL2VIE-BIANCO-70W-2WOOFER6.5""CE ROHS","217,57",EUR,E5AB.jpg

As you can see you now have this structure:
**Main Category:**
CASSE AMPLIFICATE &amp; ACCESSORI
**Sub Category:**
ACCESSORI PER CASSE AMPLIFICATE

Now if you try to export, in the CSV downloaded file, you lose the main category!!
In the CSV the are not "CASSE AMPLIFICATE &amp; ACCESSORI" !!
(I have just tried on your demo site!)

Last edit: 13 years 5 months ago by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 5 months ago [\#108744](#108744) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108744 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

That's great.
So the issue is that the categories lines are not added to the CSV anymore because of a refactor we did in a previous release.
Add the line: Code:

$export-&gt;writeline($data);

after the code: Code:

$data[] = $category-&gt;category_name; for($i = 0; $i &lt; $after_category_count; $i++) $data[] = '';

in the file "export" of the view "product" for your backend template via the menu Display-&gt;Views and that will work.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago [\#108823](#108823) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  Replied by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108823 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

Thank'u!

Seem to not work:
If I use this code:

if(!empty($this-&gt;categories)) {
foreach($this-&gt;categories as $category) {
$data = array();
for($i = 0; $i &lt; $product_table_count; $i++)
$data[] = '';
if(!empty($category-&gt;category_parent_id) &amp;&amp; isset($this-&gt;categories[$category-&gt;category_parent_id]))
$data[] = $this-&gt;categories[$category-&gt;category_parent_id]-&gt;category_name;
else
$data[] = '';
if(!empty($category-&gt;file_path))
$data[] = $category-&gt;file_path;
else
$data[] = '';

$data[] = $category-&gt;category_name;
for($i = 0; $i &lt; $after_category_count; $i++)
$data[] = '';
$export-&gt;writeline($data);
}

It export only a empty product list,
maybe I'm doing something wrong?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 5 months ago [\#108923](#108923) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108923 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

It's working fine on my end like that.

Are you sure that you didn't add some wrong characters somewhere else in the file or removed some other code in the file ?

Can you try again with the debug mode and error reporting options of the joomla configuration turned on and then provide the generated CSV ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")**
- [![giorgiofox's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/19052-giorgiofox "View giorgiofox's Profile") Topic Author
- [ Offline](/forum/user/19052-giorgiofox)

Less More

- Posts: 46
- Thank you received: 0
-
-

13 years 5 months ago [\#108936](#108936) by [giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")  Replied by *[giorgiofox](/forum/user/19052-giorgiofox "View giorgiofox's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108936 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

Hello, this is my code, and in attachment you can find the generated CSV.
Turned on also the debug mode, but nothing changed.

As you can see is empty ![:(](/media/kunena/emoticons/22.png ":(")
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.1.3 * @author hikashop.com * @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php while(ob_get_level() &gt; 1) ob_end_clean(); $config =&amp; hikashop_config(); $format = $config-&gt;get('export_format','csv'); $separator = $config-&gt;get('csv_separator',';'); $force_quote = $config-&gt;get('csv_force_quote',1); $export = hikashop_get('helper.spreadsheet'); $export-&gt;init($format, 'hikashopexport', $separator, $force_quote); $characteristic = hikashop_get('class.characteristic'); $classProduct = hikashop_get('class.product'); $characteristic-&gt;loadConversionTables($this); $db = JFactory::getDBO(); if(version_compare(JVERSION,'3.0','&lt;')){ $columnsTable = $db-&gt;getTableFields(hikashop_table('product')); $columnsArray = reset($columnsTable); } else { $columnsArray = $db-&gt;getTableColumns(hikashop_table('product')); } $columnsArray['categories_ordering'] = 'categories_ordering'; $columns = $products_columns = array_keys($columnsArray); $product_table_count = count($columns); $columns = array_merge($columns, array( 'parent_category' =&gt; 'parent_category', 'categories_image' =&gt; 'categories_image', 'categories' =&gt; 'categories', 'price_value' =&gt; 'price_value', 'price_currency_id' =&gt; 'price_currency_id', 'price_min_quantity' =&gt; 'price_min_quantity', 'price_access' =&gt; 'price_access', 'files' =&gt; 'files', 'images' =&gt; 'images', 'related' =&gt; 'related', 'options' =&gt; 'options' )); $characteristicsColumns = array(); if(!empty($this-&gt;characteristics)) { foreach($this-&gt;characteristics as $characteristic) { if(empty($characteristic-&gt;characteristic_parent_id)) { $columns[$characteristic-&gt;characteristic_value] = $characteristic-&gt;characteristic_value; $characteristicsColumns[] = $characteristic-&gt;characteristic_value; } } } $after_category_count = count($columns)-($product_table_count+3); $export-&gt;writeline($columns); if(!empty($this-&gt;categories)) { foreach($this-&gt;categories as $category) { $data = array(); for($i = 0; $i &lt; $product_table_count; $i++) $data[] = ''; if(!empty($category-&gt;category_parent_id) &amp;&amp; isset($this-&gt;categories[$category-&gt;category_parent_id])) $data[] = $this-&gt;categories[$category-&gt;category_parent_id]-&gt;category_name; else $data[] = ''; if(!empty($category-&gt;file_path)) $data[] = $category-&gt;file_path; else $data[] = ''; $data[] = $category-&gt;category_name; for($i = 0; $i &lt; $after_category_count; $i++) $data[] = ''; $export-&gt;writeline($data); } } if(!empty($this-&gt;products)) { foreach($this-&gt;products as $k =&gt; $product) { if($product-&gt;product_type == 'variant') $this-&gt;products[$k]-&gt;product_parent_id = $this-&gt;products[$product-&gt;product_parent_id]-&gt;product_code; } foreach($this-&gt;products as $product) { $data = array(); foreach($products_columns as $column) { if(!empty($product-&gt;$column) &amp;&amp; is_array($product-&gt;$column)) $product-&gt;$column = implode($separator,$product-&gt;$column); $data[] = @$product-&gt;$column; } $categories = array(); if(!empty($product-&gt;categories)) { foreach($product-&gt;categories as $category) { if(!empty($this-&gt;categories[$category])) $categories[] = str_replace(array('"',',',';'), array('""','\\,','\\;'), $this-&gt;categories[$category]-&gt;category_name); } } $data[] = ''; $data[] = ''; if(!empty($categories)) $data[] = implode($separator,$categories); else $data[] = ''; $values = array(); $codes = array(); $qtys = array(); $accesses = array(); if(!empty($product-&gt;prices)) { foreach($product-&gt;prices as $price) { $values[] = $price-&gt;price_value; $codes[] = $this-&gt;currencies[$price-&gt;price_currency_id]-&gt;currency_code; $qtys[] = $price-&gt;price_min_quantity; $accesses[] = $price-&gt;price_access; } } if(empty($values)) { $data[] = ''; $data[] = ''; $data[] = ''; $data[] = ''; } else { $data[] = implode('&#124;', $values); $data[] = implode('&#124;', $codes); $data[] = implode('&#124;', $qtys); $data[] = implode('&#124;', $accesses); } $files = array(); if(!empty($product-&gt;files)) { foreach($product-&gt;files as $file) { $files[] = str_replace(array('"',',',';'), array('""','\\,','\\;'), $file-&gt;file_path); } } if(empty($files)) { $data[] = ''; } else { $data[] = implode($separator, $files); } $images = array(); if(!empty($product-&gt;images)) { foreach($product-&gt;images as $image) { $images[] = str_replace(array('"',',',';'), array('""','\\,','\\;'), $image-&gt;file_path); } } if(empty($images)) { $data[] = ''; } else { $data[] = implode($separator, $images); } $related = array(); if(!empty($product-&gt;related)) { foreach($product-&gt;related as $rel) { if(!isset($this-&gt;products[$rel]-&gt;product_code)) $this-&gt;products[$rel] = $classProduct-&gt;get($rel); $related[] = str_replace(array('"',',',';'), array('""','\\,','\\;'), @$this-&gt;products[$rel]-&gt;product_code); } } if(empty($related)) { $data[] = ''; } else { $data[] = implode($separator, $related); } $options = array(); if(!empty($product-&gt;options)) { foreach($product-&gt;options as $rel) { if(!isset($this-&gt;products[$rel]-&gt;product_code)) $this-&gt;products[$rel] = $classProduct-&gt;get($rel); $options[] = str_replace(array('"',',',';'), array('""','\\,','\\;'), @$this-&gt;products[$rel]-&gt;product_code); } } if(empty($options)) { $data[] = ''; } else { $data[] = implode($separator, $options); } if(!empty($product-&gt;variant_links)) { $characteristics = array(); if(!empty($characteristicsColumns)) { foreach($product-&gt;variant_links as $char_id) { if(!empty($this-&gt;characteristics[$char_id])) { $char = $this-&gt;characteristics[$char_id]; if(!empty($this-&gt;characteristics[$char-&gt;characteristic_parent_id])) { $key = $this-&gt;characteristics[$char-&gt;characteristic_parent_id]-&gt;characteristic_value; $characteristics[$key] = str_replace('"','""',$char-&gt;characteristic_value); } } } foreach($characteristicsColumns as $characteristic){ $data[] = @$characteristics[$characteristic]; } } } elseif(!empty($characteristicsColumns)) { for($i = 0; $i &lt; count($characteristicsColumns); $i++) { $data[] = ''; } } $export-&gt;writeLine($data); } } $export-&gt;send(); exit;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 5 months ago [\#108939](#108939) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug Exporting products](/forum/3-bug-report/83546-bug-exporting-products#108939 "Hello, I think there is a bug exporting all my product:  In the generated CSV file, the column with PARENT&#95;CATEGORY is empty, but on the site, is populated.. I really neeed this to mass modify my producy, but actually is almost impossible export, modify and reimport the CSV...  Thanks Giorgio")*

I checked your CSV and it is now correct.

It is not empty at all but contains all the category structure at the beginning and then all the products data after it, as it should.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84MzU0Ni1idWctZXhwb3J0aW5nLXByb2R1Y3RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.081 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
