I want to create a store by magento and selling digital files (mp3, pdf, mkv, mp4). but i need to send resumable link to my customer by email. magento have not configuration for resumable link by defult. but i need to create resumable link can you help me?
1 Answer
The download is generated in the _processDownload()
function in Mage_Downloadable_DownloadController
(see app/code/core/Mage/Downloadable/controllers/DownloadController.php
).
What you need to do is, to create a new module with a controller override in it.
1.) Create your module ("Namespace_Module").
2.) add this to your config.xml
<config>
<frontend>
<routers>
<downloadable>
<args>
<modules>
<Namespace_Module before="Mage_Downloadable">Namespace_Module</Namespace_Module>
</modules>
</args>
</downloadable>
</routers>
</frontend>
</config>
3.) create Namespace/Module/controllers/DownloadController.php
require_once 'Mage/Downloadable/controllers/DownloadController.php';
class Namespace_Module_DownloadController extends Mage_Downloadable_DownloadController {
protected function _processDownload($resource, $resourceType) {
//put your resume download logic here
}
}