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

#   updating filepath goes wrong

##

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

Less More

- Posts: 261
- Thank you received: 5
-
-

12 years 2 months ago -  12 years 2 months ago [\#170305](#170305) by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")  *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170305 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")* was created by *[Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")*

-- url of the page with the problem -- : [ www.artlantismedia.com](http://www.artlantismedia.com)
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5
-- PHP version -- : ??
-- Browser(s) name and version -- : all browsers
-- Error-message(debug-mod must be tuned on) -- : No error message

Hi,

I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought.
- export to CSV
- Change URL of downloadpath in the ' files' field.
- Import CSV in hikashop and the changes are done.

Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there.
I tried several times with different products but the result is the same.

Am I doing something wrong?
I need to update thousands of products and doing this manually in hikashop is too time consuming.

Thanks in advance

Sjaak

Last edit: 12 years 2 months ago by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 2 months ago -  12 years 2 months ago [\#170314](#170314) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170314 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

Hi,

Please explain with more details the modification you made, otherwise I won't be able to tell you if it's wrong or not.
A screenshot of your new configuration could help.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 12 years 2 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

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

Less More

- Posts: 261
- Thank you received: 5
-
-

12 years 2 months ago [\#170356](#170356) by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")  Replied by *[Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170356 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

HI Jerome,

Thank you for your fast reply.

I added some screenshots.

Old filepath.jpg shows the original path of the downloadable file.
Old filepath in CSV.jpg shows the original filepath of the downloadable file as shown in the CSV file that was exported from hikashop.
New filepath in CSV.jpg shows the altered filepath in the new CSV file.
import CSV.jpg shows that I try to import the new CSV in hikashop.
empty screen after import.jpg shows an empty screen. I can't tell you what happens here.
Downloadpath not changed.jpg shows that the downloadpath is not altered in hikashop

The CSV file that I tried to import is a very small file containing just 80 products. The size of the file is 138kb.

I hope this helps.

Best regards

Sjaak

- [ ![old&#95;filepath.jpg](/forum/attachment/19427) ](/forum/attachment/19427 "old&#95;filepath.jpg") [ ](/forum/attachment/19427?download=1 "old&#95;filepath.jpg")
- [ ![Old&#95;filepath&#95;in&#95;CSV.jpg](/forum/attachment/19428) ](/forum/attachment/19428 "...ath&#95;in&#95;CSV.jpg") [ ](/forum/attachment/19428?download=1 "...ath&#95;in&#95;CSV.jpg")
- [ ![New&#95;filepath&#95;in&#95;CVS.jpg](/forum/attachment/19429) ](/forum/attachment/19429 "...ath&#95;in&#95;CVS.jpg") [ ](/forum/attachment/19429?download=1 "...ath&#95;in&#95;CVS.jpg")
- [ ![import&#95;CSV.jpg](/forum/attachment/19430) ](/forum/attachment/19430 "import&#95;CSV.jpg") [ ](/forum/attachment/19430?download=1 "import&#95;CSV.jpg")
- [ ![empty&#95;screen&#95;after&#95;import.jpg](/forum/attachment/19431) ](/forum/attachment/19431 "...ter&#95;import.jpg") [ ](/forum/attachment/19431?download=1 "...ter&#95;import.jpg")
- [ ![Downloadpath&#95;not&#95;changed.jpg](/forum/attachment/19432) ](/forum/attachment/19432 "...ot&#95;changed.jpg") [ ](/forum/attachment/19432?download=1 "...ot&#95;changed.jpg")

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

12 years 2 months ago [\#170431](#170431) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170431 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

Hi,

The files value in your new CSV is not OK for what you want to do.
What you did here is that you ask the import to download each file from your own website and put it directly at the root of your upload secure folder. And thus, that's why it crashes almost instantaneously as it tries to download all the files and that it quickly either fill up your PHP memory or time out after a few downloads.

Instead, you should enter only the new relative path in your CSV so that it updates the path of the files in the database and have the files moved manually via FTP to their new location in your upload secure folder.

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

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

Less More

- Posts: 261
- Thank you received: 5
-
-

12 years 2 months ago -  12 years 2 months ago [\#170443](#170443) by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")  Replied by *[Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170443 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

Hi Nicolas,

Thanks for your reply. Perhaps you are right and I am doing something completely wrong. What you explain is not exactly what I try to do.

This is the situation: In the near future my downloadable files will be downloaded from another server. On the other server the files are already uploaded. So now I want to tell hikashop where the files are located. The new filepaths that you see in the screenshots are filepaths on the other server. They are correct and tested. Using these URLs the files download OK.

If the method that I use is wrong,.....can you advise me another method to do this?
Thinking about your answer I would say that I first need to empty the field ' files' by importing a CSV that contains no filepaths. Then import a new CSV that contains the new filepaths on the other server. A bit of a hassle and also time consuming. Am I thinking correct or is there another method?

Thanks

Sjaak

Last edit: 12 years 2 months ago by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile"). Reason: correcting typo's

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

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

Less More

- Posts: 261
- Thank you received: 5
-
-

12 years 2 months ago [\#170447](#170447) by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")  Replied by *[Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170447 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

Well I tested the method I described.
I imported a CSV file with no downloadpaths for the files.
Then checked whether the ' file' fields are empty, which they should be after that.

No avail...the original paths still where there.

I am open to new suggestions.

Sjaak

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

12 years 2 months ago [\#170455](#170455) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170455 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

Hi,

If you don't set anything in the files column, the files column will be ignored. So it's normal that you don't see any change.
If you don't want to have the files on your own web server, then there is no solution unless you modify the code of HikaShop.
If you put the URL via the interface, the system will indeed do what you want, but if you give the URL in your CSV, the system will first download the file and then put the name of the file in the upload secure folder.
So you would need to delete the code: Code:

$unset = array(); foreach($product-&gt;files as $k =&gt; $file){ if(substr($file,0,7)=='http://'&#124;&#124;substr($file,0,8)=='https://'){ $parts = explode('/',$file); $name = array_pop($parts); if(!file_exists($this-&gt;uploadFolder.$name)){ $data = @file_get_contents($file); if(empty($data) &amp;&amp; !empty($this-&gt;default_file)){ $name = $this-&gt;default_file; }else{ JFile::write($this-&gt;uploadFolder.$name,$data); } }else{ $size = $this-&gt;getSizeFile($file); if($size!=filesize($this-&gt;uploadFolder.$name)){ $name=$size.'_'.$name; if(!file_exists($this-&gt;uploadFolder.$name)){ JFile::write($this-&gt;uploadFolder.$name,file_get_contents($file)); } } } if(file_exists($this-&gt;uploadFolder.$name) &amp;&amp; (filesize($this-&gt;uploadFolder.$name) &gt; 0 &#124;&#124; filesize($this-&gt;uploadFolder.$name) === false)){ $product-&gt;files[$k] = $name; }else{ $unset[]=$k; } } } if(!empty($unset)){ foreach($unset as $k){ unset($product-&gt;files[$k]); } }

from the file administrator/components/com_hikashop/helper/import.php and then run the import with a CSV with the full URL to the externally hosted files and it should work fine.

The following user(s) said Thank You: [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")

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

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

Less More

- Posts: 261
- Thank you received: 5
-
-

12 years 2 months ago [\#170534](#170534) by [Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")  Replied by *[Sjaak](/forum/user/1566-sjaak "View Sjaak's Profile")* on topic *[updating filepath goes wrong](/forum/37-import-export-csv-xls/870877-updating-filepath-goes-wrong#170534 "-- url of the page with the problem -- :   www.artlantismedia.com  -- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5 -- PHP version -- : ?? -- Browser(s) name and version -- : all browsers -- Error-message(debug-mod must be tuned on) -- : No error message  Hi,  I am going to change the downloadpaths for downloadable products. That is not a hard task to do.....I thought. - export to CSV - Change URL of downloadpath in the ' files' field. - Import CSV in hikashop and the changes are done.  Not so. The changes are not visible. When I check the products to see if they have a new downloadpath I see no changes. The old downloadpath is still there. I tried several times with different products but the result is the same.  Am I doing something wrong? I need to update thousands of products and doing this manually in hikashop is too time consuming.  Thanks in advance  Sjaak")*

Thank you Nicolas,

This works for me.

Sjaak

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

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