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

#   Only import "image file name" from CSV url image path.

##

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile") Topic Author
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

8 years 11 months ago -  8 years 11 months ago [\#284189](#284189) by [river](/forum/user/9591-river "View river's Profile")  *[Only import "image file name" from CSV url image path.](/forum/37-import-export-csv-xls/893135-only-import-image-file-name-from-csv-url-image-path#284189 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.2 -- PHP version -- : 7  My csv file from my supplier has a url images path that looks someting like this:  url 1: https://storage/ma/8fb55831b745485c88ba503f8ae77c13/960999b973f1423680fcfdf600e7f202/800-968-0-jpg.Jpeg/86923F31D96D6796B65762BA98243C1BB78E06EA/04248136&#95;display.jpeg url 2: https:/m/storage/ma/8433019a058e4a82a50847c1dbd175ab/e3dafc006dbe43f5afe26493e0afc9c2/800-968-0-jpg.Jpeg/BA7F302207B1E9AC2D752A4AE54FAB544DEF68A3/04248135&#95;display.jpeg  I then change this field to &quot;images&quot; so hikashop can import the image.  But I don't want hikashop to import and download the image. I only want hikashop to import &quot;the image file name&quot;  ....In the two urls above the &quot;image file name&quot; whould be (the last part of the url) from url 1: 04248136&#95;display.jpeg from url 2: 04248135&#95;display.jpeg  I know that I can select &quot;Store images locally&quot; to NO, but then hikashop import the whole url path, and I don't want that.  Can I do some changes in the import.php file in order to make hikashop import the &quot;image name jpg&quot; and without downloading the image itself ? Because I want to download these images using superfast SSh wget command later.  Hope this makes sense. Tnx =)")* was created by *[river](/forum/user/9591-river "View river's Profile")*

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.2
-- PHP version -- : 7

My csv file from my supplier has a url images path that looks someting like this:

url 1: https://storage/ma/8fb55831b745485c88ba503f8ae77c13/960999b973f1423680fcfdf600e7f202/800-968-0-jpg.Jpeg/86923F31D96D6796B65762BA98243C1BB78E06EA/04248136_display.jpeg
url 2: https:/m/storage/ma/8433019a058e4a82a50847c1dbd175ab/e3dafc006dbe43f5afe26493e0afc9c2/800-968-0-jpg.Jpeg/BA7F302207B1E9AC2D752A4AE54FAB544DEF68A3/04248135_display.jpeg

I then change this field to "images" so hikashop can import the image.

But I don't want hikashop to import and download the image. I only want hikashop to import "the image file name"

....In the two urls above the "image file name" whould be (the last part of the url)
from url 1: 04248136_display.jpeg
from url 2: 04248135_display.jpeg

I know that I can select "Store images locally" to NO, but then hikashop import the whole url path, and I don't want that.

Can I do some changes in the import.php file in order to make hikashop import the "image name jpg" and without downloading the image itself ?
Because I want to download these images using superfast SSh wget command later.

Hope this makes sense.
Tnx ![=)](/smile.gif "=)")

Last edit: 8 years 11 months ago by [river](/forum/user/9591-river "View river's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTMxMzUtb25seS1pbXBvcnQtaW1hZ2UtZmlsZS1uYW1lLWZyb20tY3N2LXVybC1pbWFnZS1wYXRoP3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

8 years 11 months ago -  8 years 11 months ago [\#284205](#284205) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Only import "image file name" from CSV url image path.](/forum/37-import-export-csv-xls/893135-only-import-image-file-name-from-csv-url-image-path#284205 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.2 -- PHP version -- : 7  My csv file from my supplier has a url images path that looks someting like this:  url 1: https://storage/ma/8fb55831b745485c88ba503f8ae77c13/960999b973f1423680fcfdf600e7f202/800-968-0-jpg.Jpeg/86923F31D96D6796B65762BA98243C1BB78E06EA/04248136&#95;display.jpeg url 2: https:/m/storage/ma/8433019a058e4a82a50847c1dbd175ab/e3dafc006dbe43f5afe26493e0afc9c2/800-968-0-jpg.Jpeg/BA7F302207B1E9AC2D752A4AE54FAB544DEF68A3/04248135&#95;display.jpeg  I then change this field to &quot;images&quot; so hikashop can import the image.  But I don't want hikashop to import and download the image. I only want hikashop to import &quot;the image file name&quot;  ....In the two urls above the &quot;image file name&quot; whould be (the last part of the url) from url 1: 04248136&#95;display.jpeg from url 2: 04248135&#95;display.jpeg  I know that I can select &quot;Store images locally&quot; to NO, but then hikashop import the whole url path, and I don't want that.  Can I do some changes in the import.php file in order to make hikashop import the &quot;image name jpg&quot; and without downloading the image itself ? Because I want to download these images using superfast SSh wget command later.  Hope this makes sense. Tnx =)")*

Hi,

You want to change that code: Code:

if(!file_exists($this-&gt;uploadFolder.$name)){ $content = file_get_contents($image); JFile::write($this-&gt;uploadFolder.$name,$content); }else{ $size = $this-&gt;getSizeFile($image); if($size!=filesize($this-&gt;uploadFolder.$name)){ $name=$size.'_'.$name; if(!file_exists($this-&gt;uploadFolder.$name)){ $content = file_get_contents($image); JFile::write($this-&gt;uploadFolder.$name,$content); } } } if(file_exists($this-&gt;uploadFolder.$name) &amp;&amp; (filesize($this-&gt;uploadFolder.$name) &gt; 0 &#124;&#124; filesize($this-&gt;uploadFolder.$name) === false)){

to: Code:

if(true){

in administrator/components/com_hikashop/helpers/import.php

Last edit: 8 years 11 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile") Topic Author
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

8 years 11 months ago [\#284436](#284436) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[Only import "image file name" from CSV url image path.](/forum/37-import-export-csv-xls/893135-only-import-image-file-name-from-csv-url-image-path#284436 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.2 -- PHP version -- : 7  My csv file from my supplier has a url images path that looks someting like this:  url 1: https://storage/ma/8fb55831b745485c88ba503f8ae77c13/960999b973f1423680fcfdf600e7f202/800-968-0-jpg.Jpeg/86923F31D96D6796B65762BA98243C1BB78E06EA/04248136&#95;display.jpeg url 2: https:/m/storage/ma/8433019a058e4a82a50847c1dbd175ab/e3dafc006dbe43f5afe26493e0afc9c2/800-968-0-jpg.Jpeg/BA7F302207B1E9AC2D752A4AE54FAB544DEF68A3/04248135&#95;display.jpeg  I then change this field to &quot;images&quot; so hikashop can import the image.  But I don't want hikashop to import and download the image. I only want hikashop to import &quot;the image file name&quot;  ....In the two urls above the &quot;image file name&quot; whould be (the last part of the url) from url 1: 04248136&#95;display.jpeg from url 2: 04248135&#95;display.jpeg  I know that I can select &quot;Store images locally&quot; to NO, but then hikashop import the whole url path, and I don't want that.  Can I do some changes in the import.php file in order to make hikashop import the &quot;image name jpg&quot; and without downloading the image itself ? Because I want to download these images using superfast SSh wget command later.  Hope this makes sense. Tnx =)")*

Tnx this works great.

Is it possible that you can make this a function a part of the next Hikashop version ?

For me it is a very good function sinice im using the hikashop as a affiliate store, and Im sure many other would like this function.

Tnx.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTMxMzUtb25seS1pbXBvcnQtaW1hZ2UtZmlsZS1uYW1lLWZyb20tY3N2LXVybC1pbWFnZS1wYXRoP3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

8 years 11 months ago [\#284444](#284444) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Only import "image file name" from CSV url image path.](/forum/37-import-export-csv-xls/893135-only-import-image-file-name-from-csv-url-image-path#284444 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.2 -- PHP version -- : 7  My csv file from my supplier has a url images path that looks someting like this:  url 1: https://storage/ma/8fb55831b745485c88ba503f8ae77c13/960999b973f1423680fcfdf600e7f202/800-968-0-jpg.Jpeg/86923F31D96D6796B65762BA98243C1BB78E06EA/04248136&#95;display.jpeg url 2: https:/m/storage/ma/8433019a058e4a82a50847c1dbd175ab/e3dafc006dbe43f5afe26493e0afc9c2/800-968-0-jpg.Jpeg/BA7F302207B1E9AC2D752A4AE54FAB544DEF68A3/04248135&#95;display.jpeg  I then change this field to &quot;images&quot; so hikashop can import the image.  But I don't want hikashop to import and download the image. I only want hikashop to import &quot;the image file name&quot;  ....In the two urls above the &quot;image file name&quot; whould be (the last part of the url) from url 1: 04248136&#95;display.jpeg from url 2: 04248135&#95;display.jpeg  I know that I can select &quot;Store images locally&quot; to NO, but then hikashop import the whole url path, and I don't want that.  Can I do some changes in the import.php file in order to make hikashop import the &quot;image name jpg&quot; and without downloading the image itself ? Because I want to download these images using superfast SSh wget command later.  Hope this makes sense. Tnx =)")*

Hi,

That unfortunately is too specific to make it an option.

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

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