Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Forum Search

Keyword

Download folders in safe path

  • pacoelho
  • pacoelho's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 4 months ago #3117 by pacoelho
Download folders in safe path was created by pacoelho
Hi, I am a new Spiral Scripts customer and I bought a Spiral Paid Download Plugin for Virtuemart.

Question: To organize my files for download, it would be optimal to create more folders on the "safe" folder. Is there any way to VirtueMart recognize them?

I will have many files to download, and will be very confused if they are all in one folder.

Thanks in advance.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3119 by boggler
Replied by boggler on topic Download folders in safe path
In the early versions of Virtuemart it had trouble finding files in sub-directories of the safe path folder, this is not the case in more recent versions, so you can use separate folders.

But when you view the files list in the plugin options you will still see it as a single list, so might consider also including something in the file name, such as a prefix, to help you find the right file.

Please Log in or Create an account to join the conversation.

  • pacoelho
  • pacoelho's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 4 months ago #3122 by pacoelho
Replied by pacoelho on topic Download folders in safe path
Thanks for reply but are you sure?

In the safe path folder I created a sub folder named "downloads" and inside of it other folders. None is recognized by the VM. When I make synchronise the files, Virtuemart says "Did not synchronise media for sale in /home/.../public_html/safepath/downloads"
So, I think it's not possible to do what I want that way. Do you know how can I make it right?

I'm using the new version VM 3.0.6.4.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3123 by boggler
Replied by boggler on topic Download folders in safe path
That is very odd - it may be an issue with VM 3.0.6.4. Does it synchronize them if they are in the root safe path folder?
I will test this out on one of our own testing sites.

Please Log in or Create an account to join the conversation.

  • pacoelho
  • pacoelho's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 4 months ago #3124 by pacoelho
Replied by pacoelho on topic Download folders in safe path
I also think so.
And yes, when I sync the files they are inside the folder downloads. I notice that all the folders that are within the safe are not synchronized by the VM.
I'll look for reviews on the VM forum too.
Thank you for trying to find a solution to the case.

Another issue:
I translated language files of the two download plugins (paid / unpaid) to Portuguese pt-PT. If you are interested I can provide (free) so you can add to the package.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3125 by boggler
Replied by boggler on topic Download folders in safe path
I have tested on one of our testing sites, using Virtuemart 3.0.6.2, which is the latest release - I am not sure where you would get 3.0.6.4. There is no problem, it finds all the files in the main safe path folder and sub-directories, as it should.

So I think that you are making a mistake somewhere. I am rather puzzled by the error message that you say you are getting: "Did not synchronise media for sale in /home/.../public_html/safepath/downloads" - is that the exact error message? If Virtuemart is not finding the files you would simply get a message saying:

Synchronized 0 media for forSale in directory /path/to/folder/safe/

Check that you have set the safe path correctly. Also if you want to arrange the files in sub-directories it is probably a much better idea to just use ftp and transfer them all across directly to the place where you want them to be, ie a sub-directory of the safe path. Then run the Virtuemart media synchronization, it should still find the files and correctly set the role as for sale.

If that still is problematic, if you Google 'problems synchronizing media in virtuemart' it will give you a whole list of further things to try.

Please Log in or Create an account to join the conversation.

  • pacoelho
  • pacoelho's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 4 months ago #3126 by pacoelho
Replied by pacoelho on topic Download folders in safe path
Of course I am using FTP. Everything you say is correct and the procedure is that.
Everything is being done correctly.
Probably there is a problem with this version of VM. The VM only synchronizes the main folder safe and does not recognize other folders that are inside it.

And by the way the latest version of VM 3.0.6.4 ( dev.virtuemart.net/projects/virtuemart/files ) - 24/03/2015.

I will continue to try to discover the solution. If you have news let me know.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3127 by boggler
Replied by boggler on topic Download folders in safe path
OK, but I think it is always best to test with the official release which is 3.0.6.2 - otherwise I have found in the past you can spend a lot of time trying to work around problems that are actually just bugs that are fixed in the stable release. Unless you are deliberately trying to debug Virtuemart of course.

But I will certainly let you know if there is any news on this.

Can you confirm what the exact error message is that you get? Sometimes this is a way to track down where the error is occurring.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3128 by boggler
Replied by boggler on topic Download folders in safe path
Thanks for the offer of the language files - sorry for not responding earlier. You can post them here or email them to me at customers at spiral scripts. I will add them to the collection at https://www.spiralscripts.co.uk/language-files.html

Please Log in or Create an account to join the conversation.

  • pacoelho
  • pacoelho's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 4 months ago #3129 by pacoelho
Replied by pacoelho on topic Download folders in safe path
Attachments of the languages in your email.

See the attached image of this message. It is a VM message of the print-screen after synchronization.
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3130 by boggler
Replied by boggler on topic Download folders in safe path
OK, thanks. Unfortunately I can't track down the source of that message at the moment.

But I have had a chance to look at the code which handles the media synchronization, there is some very dodgy code there, which may well explain why it does not always work properly.

The code is in administrator/components/com_virtuemart/helpers/migrator.php. There is one thing that you might try, which is to modify line 376, change
$foldersInDir = $subfoldersInDir;

to
$foldersInDir = array_merge($foldersInDir,$subfoldersInDir);

It is not much of an improvement, but it might avoid some problems. The basic problem with this code is that $foldersInDir is the control variable of a loop which is now being modified within the loop - not something that any decent programmer should be doing in my view.

My modification might make things a bit better though by adding the additional sub-folders to the end of the control array rather than replacing it altogether. But it is not guaranteed - maybe the only solution is to rewrite the code completely.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #3131 by boggler
Replied by boggler on topic Download folders in safe path
Actually I don't think my solution will work - I tested it, and it did not. I don't know what to suggest at the moment.

Please Log in or Create an account to join the conversation.

Moderators: boggler
Time to create page: 0.299 seconds

Donate to Us

If you like our extensions, consider making a donation to say thanks.