0

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?

2

1 Answer 1

2

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
   }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.