Now the problem with Opencart 3.x is that the whole storage folder isn't in the opencart installation folder anymore because you have to move it out of there and place it elsewhere on the server.
How can I link to this folder from within Opencart?
As if I link to DIR_DOWNLOAD it gives you the server path and this is not accessible from outside your server.
Now when I want to link to the folder it gives me this:
http://www.domain.com/volume1/web/oc_st ... d/file.zip
Could someone point me in the right direction?
All my extensions: Click here or Click here
All my extensions: Click here or Click here
'admin/controller/extension/',
'admin/language/',
'admin/model/extension/',
'admin/view/image/',
'admin/view/javascript/',
'admin/view/stylesheet/',
'admin/view/template/extension/',
'catalog/controller/extension/',
'catalog/language/',
'catalog/model/extension/',
'catalog/view/javascript/',
'catalog/view/theme/',
'system/config/',
'system/library/',
'image/catalog/'
You may have to rethink your folders structure. Why do you need a file in the download folder?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
The file is placed in the download folder.
In OC2.x you could simply link to the file like this: http://www.domain.com/system/storage/download/file.zip
But in OC3.x the storage folder is moved out of the opencart installation dir.
I am looking for a way to internally link to this location (in the controller for example)
In the opencart Admin I want to be able to open the file placed in the download folder.
But I am stuck on this for a couple of days as I have no idea how to accomplish this.
All my extensions: Click here or Click here
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
http://www.domain.com/volume1/web/storage/download
As volume1 is a server folder it is inaccessible from the outside.
The only option now is to make a folder in the image/catalog/download.
But to do this the customer has to set the folder CHMOD to 755 or 777 which isn't something you would want your customer to do.
And aside from that the url would also look funny as it has the image folder in the url.
All my extensions: Click here or Click here
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Have you ever installed OC3?
This is the first thing you must do.
All my extensions: Click here or Click here
Anyway, normally you should be able to access your download folder from an admin controller via a normal
Code: Select all
file_get_contents( DIR_DOWNLOAD . 'myfile' )
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I will try your idea tomorrow thank and I will let you know if it worked.
All my extensions: Click here or Click here
Users browsing this forum: moreduff and 261 guests