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

#   Importation images\_name et images\_description

##

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

Less More

- Posts: 1
- Thank you received: 0
-
-

12 years 3 weeks ago [\#173955](#173955) by [lomart](/forum/user/34362-lomart "View lomart's Profile")  *[Importation images\_name et images\_description](/forum/37-import-export-csv-xls/872024-importation-images-name-et-images-description#173955 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 2.5.27 -- PHP version -- : 5.4.3 -- Browser(s) name and version -- : Firefox 32  Bonjour,  J'ai réussi à faire une importation par CSV de produits. J'ai juste un probléme avec les colonnes images&#95;name et images&#95;description qui ne sont pas prise en compte. Ai-je omis quelque chose ?")* was created by *[lomart](/forum/user/34362-lomart "View lomart's Profile")*

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.4.3
-- Browser(s) name and version -- : Firefox 32

Bonjour,

J'ai réussi à faire une importation par CSV de produits. J'ai juste un probléme avec les colonnes images_name et images_description qui ne sont pas prise en compte.
Ai-je omis quelque chose ?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 weeks ago [\#174063](#174063) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Importation images\_name et images\_description](/forum/37-import-export-csv-xls/872024-importation-images-name-et-images-description#174063 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 2.5.27 -- PHP version -- : 5.4.3 -- Browser(s) name and version -- : Firefox 32  Bonjour,  J'ai réussi à faire une importation par CSV de produits. J'ai juste un probléme avec les colonnes images&#95;name et images&#95;description qui ne sont pas prise en compte. Ai-je omis quelque chose ?")*

Bonjour,

Il y a une légère modification à apporter dans la version courante, et qui est déjà corrigé pour la prochaine.
Le fichier à éditer est "administrator/components/com_hikashop/helpers/import.php".

Remplacer la fonction "_getFilesExtraData()" par: Code:

function _getFilesExtraData(&amp;$files, &amp;$product,$type='files'){ $variables = array('name','description','ordering','limit','free_download'); foreach($variables as $var){ $name = $type.'_'.$var; if(empty($product-&gt;$name)) continue; $array = $this-&gt;_separate($product-&gt;$name); if(count($array) != count($files)) continue; $key = 'file_'.$var; foreach($files as $k =&gt; $file){ $files[$k]-&gt;$key = $array[$k]; } } }

Et "separate()" par: Code:

function _separate(&amp;$files){ $separator=''; foreach($this-&gt;listSeparators as $sep){ $pos = strpos($files,$sep); if(preg_match('#(?!\\\\)'.$sep.'#',$files)){ $separator = $sep; $files=str_replace('\\'.$separator,'#.#.#.#',$files); break; } } if(!empty($separator)){ $files = explode($separator,$files); }else{ $files = array($files); } foreach($files as $k =&gt; $v){ $files[$k]=str_replace('#.#.#.#',$separator,$v); } }

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

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

[](#top)
