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

#   Import : pas de "parent category"

##

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago -  13 years 3 months ago [\#111279](#111279) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#111279 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")* was created by *[oliv](/forum/user/7307-oliv "View oliv's Profile")*

Bonjour,
Comment se fait-il que lorsque j'exporte la base, la colonne "parent category" soit vide sur les lignes des fiches produits?
Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie.
Merci.

Last edit: 13 years 3 months ago by [oliv](/forum/user/7307-oliv "View oliv's Profile"). Reason: réglé

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 3 months ago [\#111318](#111318) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#111318 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Bonjour,

Si je comprend bien, le problème est l'import qui n'importe pas les catégories?
Pourriez vous nous donner un example du csv que vous utilisez pour importer les produits?
De même, est-ce que les produits ont bien une parent catégorie dans la base?

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#112696](#112696) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#112696 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Bonjour,

C'est bien à l'export que la colonne "parent category" est vide.
Puis-je vous envoyer par e-mail le fichier csv que j'exporte depuis Hikashop?
Pour répondre à votre dernière question : oui.

Merci.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 3 months ago -  13 years 3 months ago [\#112704](#112704) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#112704 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Bonjour,

Bien sure, cela nous aiderai peut-être à comprendre votre problème, une capture d'écran de l'un de vos produit nous serai aussi utile ![:)](/media/kunena/emoticons/8.png ":)").

Last edit: 13 years 3 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#112708](#112708) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#112708 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Voici une capture d'écran d'un produit et son [ url](http://jardinpromo.com/product/show/2152-motobineuse-thermique-dori-md-40-m).

[ ![02.JPG](/forum/attachment/10982) ](/forum/attachment/10982 "02.JPG")

Je vous ai envoyé le fichier d'export par e-mail.

Merci.

- [ ![02.JPG](/forum/attachment/10982) ](/forum/attachment/10982 "02.JPG") [ ](/forum/attachment/10982?download=1 "02.JPG")

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 3 months ago [\#112973](#112973) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#112973 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Je pensais plutôt à une capture d'écran de la page de configuration de l'un de vos produits, afin de bien vérifier que vos produit appartienne bien à une certaine catégorie et comparer le tout avec le fichier d'export CSV que vous m'avez envoyé.

Merci ![:)](/media/kunena/emoticons/8.png ":)").

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 3 months ago [\#113019](#113019) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113019 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Le haut de page résume les catégories et leurs structures, puis ensuite on attribut ces catégories sur tout les produits via la colonne "categories".

Après avoir examiné votre fichier CSV, je le trouve tout à fait normal, pourriez vous me donner un des exemples de problème que vous rencontrez lors de l'import de ce fichier CSV à partir de capture d'écran.

Merci ![:)](/media/kunena/emoticons/8.png ":)").

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#113022](#113022) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113022 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Le fait est que je supprime toujours ces lignes du haut du tableau parce qu'à une époque (il y a quelques mois), quand elles étaient présentes, ça me plantait le site alors qu'en les retirant non.
Je fais un test en les laissant et revient vers vous.
Merci.

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#113207](#113207) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113207 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Bonjour,
Après un test d'import, en effet, si je laisse les lignes des catégories et leurs structures, j'obtiens un message d'erreur pour chaque ligne. Hikashop ne reconnais pas le produit et pour cause c'est une catégorie :
[ ![01&#95;2013-07-10.JPG](/forum/attachment/11020) ](/forum/attachment/11020 "01&#95;2013-07-10.JPG")

Et puis donc, comme j'ai des sous-catégories qui portent les mêmes noms, il les distribue dans n'importe quelle sous-catégorie.
Merci.

- [ ![01&#95;2013-07-10.JPG](/forum/attachment/11020) ](/forum/attachment/11020 "01&#95;2013-07-10.JPG") [ ](/forum/attachment/11020?download=1 "01&#95;2013-07-10.JPG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQyNzYtaW1wb3J0LXBhcy1kZS1wYXJlbnQtY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

13 years 3 months ago [\#113339](#113339) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113339 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Ces messages ne sont pas un problème.

Les lignes de la structure de catégories ne sont pas nécessaire si vous avez déjà vos catégories dans votre boutique.

L'export utilise en effet par défaut le nom des catégories ce qui est en effet un problème dans votre cas.
MAis dans ce cas, il suffit d'éditer le fichier "export" de la vue "product" via Affichage&gt;vues et changer la ligne:
$data[] = $category-&gt;category_name;

en:
$data[] = $category-&gt;category_id;

pour récupérer l'id des catégories au lieu de leur nom dans le CSV et ainsi ne plus avoir ce soucis à l'import.

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#113354](#113354) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113354 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Bonjour,

Merci pour votre réponse qui, je le pense, nous amène vers la solution.

Par contre je n'ai pas trouvé la ligne

> $data\[\] = $category-&gt;category\_name;

dans le fichier export de la vue product.

C'est peut-être parce que ce fichier a déjà été modifié pour d'autres raisons? (les relates, les options???)
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 1.6.0 * @author hikashop.com * @copyright (C) 2010-2012 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 ob_end_clean(); if(ob_get_level()&gt;2) ob_end_clean(); ob_start(); $eol= "\r\n"; $characteristic = hikashop_get('class.characteristic'); $characteristic-&gt;loadConversionTables($this); $config =&amp; hikashop_config(); $separator = $config-&gt;get('csv_separator',";"); $db =&amp; JFactory::getDBO(); $columnsTable = $db-&gt;getTableFields(hikashop_table('product')); $columnsArray = reset($columnsTable); $columnsArray['categories_ordering']='categories_ordering'; $columns = $products_columns = array_keys($columnsArray); $product_table_count = count($columns); $columns['parent_category']='parent_category'; $columns['categories_image']='categories_image'; $columns['categories']='categories'; $columns['price_value']='price_value'; $columns['price_currency_id']='price_currency_id'; $columns['price_min_quantity']='price_min_quantity'; $columns['price_access']='price_access'; $columns['files']='files'; $columns['images']='images'; $columns['related']='related'; $columns['options']='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); $output=''; foreach($columns as $column){ if(!empty($column)){ $output.= '"'.str_replace('"','\\'.'"',$column).'"'; } $output.= $separator; } echo rtrim($output,$separator).$eol; $output=''; if(!empty($this-&gt;categories)){ foreach($this-&gt;categories as $category){ echo '"'.str_repeat('"'.$separator.'"',$product_table_count-1).'"'.$separator; if(!empty($category-&gt;category_parent_id) &amp;&amp; isset($this-&gt;categories[$category-&gt;category_parent_id])){ echo '"'.str_replace('"','""',$this-&gt;categories[$category-&gt;category_parent_id]-&gt;category_name).'"'.$separator; }else{ echo '""'.$separator; } if(!empty($category-&gt;file_path)){ echo '"'.str_replace('"','""',$category-&gt;file_path).'"'.$separator; }else{ echo '""'.$separator; } echo '"'.str_replace('"','""',$category-&gt;category_name).'"'.$separator.'"'.str_repeat('"'.$separator.'"',$after_category_count-1).'"'.$eol; } } 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 = str_replace('"','""',$this-&gt;products[$product-&gt;product_parent_id]-&gt;product_code); } } foreach($this-&gt;products as $product){ foreach($products_columns as $column){ echo '"'.str_replace('"','""',$product-&gt;$column).'"'.$separator; } $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); } } } echo '""'.$separator.'""'.$separator; if(!empty($categories)){ echo '"'.implode($separator,$categories).'"'.$separator; }else{ echo '""'.$separator; } $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)){ echo '""'.$separator.'""'.$separator.'""'.$separator.'""'.$separator; }else{ echo '"'.implode('&#124;',$values).'"'.$separator.'"'.implode('&#124;',$codes).'"'.$separator.'"'.implode('&#124;',$qtys).'"'.$separator.'"'.implode('&#124;',$accesses).'"'.$separator; } $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)){ echo '""'.$separator; }else{ echo '"'.implode($separator,$files).'"'.$separator; } $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)){ echo '""'.$separator; }else{ echo '"'.implode($separator,$images).'"'.$separator; } $related = array(); if(!empty($product-&gt;related)){ foreach($product-&gt;related as $rel){ $related[]=str_replace(array('"',',',';'),array('""','\\,','\\;'),@$this-&gt;products[$rel]-&gt;product_code); } } if(empty($related)){ echo '""'.$separator; }else{ echo '"'.implode($separator,$related).'"'.$separator; } $options = array(); if(!empty($product-&gt;options)){ foreach($product-&gt;options as $rel){ $options[]=str_replace(array('"',',',';'),array('""','\\,','\\;'),@$this-&gt;products[$rel]-&gt;product_code); } } if(empty($options)){ echo '""'; }else{ echo '"'.implode($separator,$options).'"'; } if(!empty($product-&gt;variant_links)){ echo $separator; $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); } } } $chars = array(); foreach($characteristicsColumns as $characteristic){ $chars[] = '"'.@$characteristics[$characteristic].'"'; } echo implode($separator,$chars); } }elseif(!empty($characteristicsColumns)){ echo $separator; echo str_repeat('""'.$separator,count($characteristicsColumns)-1).'""'; } echo $eol; } } $data = ob_get_clean(); header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Disposition: attachment; filename=hikashopexport.csv;"); header("Content-Transfer-Encoding: binary"); header('Content-Length: '.strlen($data)); echo $data; exit;

Merci.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 3 months ago [\#113360](#113360) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113360 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Je pense que la meilleure chose à faire serait éventuellement :
- De sauvegarder votre fichier export sur un fichier texte.
- De supprimer tout les changements effectué sur le fichier à l'aide de l'icone "poubelle", via la liste de tout vos fichier de vue ("*Hikashop-&gt;Affichage-&gt;Vues*")
- Et enfin d'appliquer la modification que Nicolas vous a donnée.

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#113362](#113362) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113362 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Bonjour Mohamed,

Pour tester, je vais le faire.

Mais cette solution ne me convient pas car si des changements on été effectués dans ce fichier c'est bien pour des raisons particulières. Hors, il est vrai que je n'ai pas précisément noté lesquels.

Merci.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQyNzYtaW1wb3J0LXBhcy1kZS1wYXJlbnQtY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

13 years 3 months ago [\#113368](#113368) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113368 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Vous avez en effet une ancienne ver du fichier, mais la modification reste somme toute similaire...

Remplacez simplement category_name par category_id et cela devrait faire pareil.

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#113386](#113386) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113386 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Champion, Nicolas!

Impeccable, ça fonctionne.

Et alors je me demande : Si on modifie les fichiers dans la console d'administration de Joomla, c'est pour garder ses modifs à chaque mise à jour.

Du coup ces fichiers là ne bénéficient pas de mise à jour dans leur écriture? C'est pas embêtant?

Merci.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 3 months ago [\#113395](#113395) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113395 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Non, les fichiers de vues modifiés via "*Hikashop-&gt;Affichage-&gt;Vues*" ne sont pas écrasés et donc pas mis jours.
Cependant les fichiers seront automatiquement mis à jours une fois ses customisations effacées, ce qui vous laisse le choix de migrer ou non vos propres modifications en fonctions de la nouvelle version du fichier de vue.

The following user(s) said Thank You: [oliv](/forum/user/7307-oliv "View oliv's Profile")

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

- **[oliv](/forum/user/7307-oliv "View oliv's Profile")**
- [![oliv's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-23.png)](/forum/user/7307-oliv "View oliv's Profile") Topic Author
- [ Offline](/forum/user/7307-oliv)

Less More

- Posts: 257
- Thank you received: 7
-
-
-
- [](http://jardinpromo.com)
-

13 years 3 months ago [\#113396](#113396) by [oliv](/forum/user/7307-oliv "View oliv's Profile")  Replied by *[oliv](/forum/user/7307-oliv "View oliv's Profile")* on topic *[Import : pas de "parent category"](/forum/5-support-en-francais-french-support-/84276-import-pas-de-parent-category#113396 "Bonjour, Comment se fait-il que lorsque j'exporte la base, la colonne &quot;parent category&quot; soit vide sur les lignes des fiches produits? Le problème est que j'ai des noms communs dans les catégories. Du coup, à l'import Hikashop ne distribue pas forcément dans la bonne catégorie. Merci.")*

Merci.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQyNzYtaW1wb3J0LXBhcy1kZS1wYXJlbnQtY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) 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.580 seconds

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

[](#top)
