Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Forum Search

Keyword

Downloads not working, I think I broke it :-)

  • richieoflynn
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 years 4 months ago #3756 by richieoflynn
Downloads not working, I think I broke it :-) was created by richieoflynn
Hi guys,

I'm using Spiral Free Download with Virtuemart ver.3.0.18 on Joomla 3.6.4. I was creating the website offline and had the plugin working away nicely but now I've uploaded the site, it doesn't work.

I have my vmfiles folder in the root outside my website, file permission on folders is 755 and 644 on pdfs in the brochures folder.

When I go to synchronize media to Virtuemart, I get all these errors like File for C:\xampp\htdocs....pdf is missing. I tried to upload a screenshot but the website won't let me.

If i have a look in Virtuemart under Media Files, they're all listed in there but it says 'File is for sale'. They weren't set up that way, these are just pdf brochures for products and free to download. If I click on the download button on the website, it looks like it downloads the file but it I can't open it. The file appears as a 0kb file in my download folder on my pc.

Not blaming the plugin for a moment, I know it's something I've done wrong. Can you help please ? I'll be more than happy to buy the plugin after this :-)

Example
Part of the message is hidden for the guests. Please log in or register to see it.
, download link toward the bottom of the page.

Thanks,

Richie.

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

More
2 years 4 months ago - 2 years 4 months ago #3757 by boggler
Replied by boggler on topic Downloads not working, I think I broke it :-)
Hello, you didn't really break it.

The problem happens because when you import the media files to Virtuemart by running the synchronisation, the entire file path is stored in the Virtuemart medias table. This causes a problem when you move the site from your offline installation to the live site, because the actual physical path to the file has changed, but this is not reflected in the entries in the Virtuemart medias table.

So you need to fix the table. There are two ways (at least) to do this.

1. You can delete the files for sale currently listed in the Virtuemart media, using the media manager, then run the media synchronization again. This should pick up the files with the correct physical path (make sure that you have set the safe path correctly in the Virtuemart configuration, if you have moved the site this will also have changed).

When you have done this, you will need to re-attach the files to the download fields for the products using the custom fields tab on the product editor.

2. You can fix the Virtuemart medias table directly, just edit the file_url field for each entry so that it is pointing to the correct path. A simple way to do this is to export the table as sql, use a text editor to edit the fields using a search and replace, then re-import the table. If you feel confident with how a mysql database works this is the simplest method, but make sure you have a backup of your database just in case.

It does not matter that Virtuemart calls the files 'for sale'. This is just how it labels files that are stored in the safe path, to distinguish them from other files such as product and category images.
Last edit: 2 years 4 months ago by boggler.

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

  • richieoflynn
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 years 4 months ago #3762 by richieoflynn
Replied by richieoflynn on topic Downloads not working, I think I broke it :-)
Hi Boggler,

Thanks for the solution, I'll have a go :-)

Richie.

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

Moderators: boggler
Time to create page: 0.274 seconds

Donate to Us

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