Client store has only one downloadable product. And it's version keep on changing.
When the version of the product changed for the first time, I uploaded new file via ftp to the related media/downloadable folder.
And updated path of the link_url of the
downloadable_link table as:
UPDATE downloadable_link SET link_url = 'http://my-store.com/media/downloadable/files/links/m/y/mysoftware-v2 0 2.zip';
Note: previous link url was:
http://my-store.com/media/downloadable/files/links/m/y/mysoftware-v2 0 1.zip
Since this update works only for new customers. I was wondering how to adjust for the existing customer who had already purchased the extension so that when they download they get the latest version instead of old version.
I tried to solve this by updating link_url of downloadable_link_purchased_item as:
UPDATE downloadable_link_purchased_item SET link_url = 'http://my-store.com/media/downloadable/files/links/m/y/mysoftware-v2 0 2.zip'
But didn't work. When existing customer tried to download, it gave the following error:
An error occurred while getting the requested content. Please contact the store owner.
Any idea how to update the link_url with the latest version of the product so that existing customer can download it? SQL approach will be preferable if possible.
EDIT: After analyzing what I found is, download code of Magento gives 404 not found code for the downloadable product with space in filename. After removing the space from filename and updating via above SQLs fixed my issue.