Forums / Setup & design / How to setup media for download after purchase?

How to setup media for download after purchase?

Author Message

Craig Broyles

Saturday 02 September 2006 6:25:02 am

So I am trying to use this web application to sell digital media content I have created. I thought the documentation said it was possible, but I can't figure it out. What I want to have happen...

A customer browsing my site clicks on a product I am selling...They are asked to pay with paypal, once the transaction is complete, I want the media file to begin downloading on their computer.

I guess it would be similar to how iTunes works. Any info is appreciated.

Martin Ulrich

Sunday 03 September 2006 4:32:10 am

I do a solution, but is surely not professionel, but enough for my small business.

Add an xmltext-field to my product-class and than put the download-link within this xml-field.

Then modify template orderview.tpl showing this xml-field.

Now on last page on checkout a downloadlink will be präsentated to customers.

regards :)

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Clemens T

Sunday 03 September 2006 3:37:22 pm

I'd build my own module, which oversees the payment/download process as a whole:

Download ----> redirect to PayPal site, which has a 'redirectURL' (I think) to redirect back to your site after the payment is complete--> (new view, verify the payment has been processed/validated) people get 1 token to download the file. You could download your own: /downloadfile/ (check the core ezpublihs php's, to do so).. and you can easily create something like:

if($token){
 eZBinaryFileHandler::downloadFile("....");
} else {
//error
}

It's just suggestions, not really a good story.. but you have to be familiar to write a module that is as complex as the one you want.

Greetings,
Clemens

Nuno Portugal

Friday 17 November 2006 11:51:54 am

Hi Sepp Spalt

How did you set in orderview.tpl to show XML fields, i can only see the options field, tried to add other attributes to product , set {attribute_view_gui attribute=$node.object.data_map.myxmlfield} in the form and it shows in product full view but when you advance in the shop, confirmorder.tpl, orderview.tpl doesn´t show the xml field...

eZ debug

Timing: Jan 31 2025 03:21:44
Script start
Timing: Jan 31 2025 03:21:44
Module start 'content'
Timing: Jan 31 2025 03:21:44
Module end 'content'
Timing: Jan 31 2025 03:21:44
Script end

Main resources:

Total runtime0.2108 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.0781370.2734
Module start 'content' 0.00520.0124 958.35161,001.7031
Module end 'content' 0.01760.1931 1,960.05473,889.9141
Script end 0.2107  5,849.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00432.0608200.0002
Check MTime0.00120.5784200.0001
Mysql Total
Database connection0.00050.232510.0005
Mysqli_queries0.115154.59441410.0008
Looping result0.00120.55561390.0000
Template Total0.192791.410.1927
Template load0.00070.342510.0007
Template processing0.191991.067810.1919
Override
Cache load0.00050.240210.0005
Sytem overhead
Fetch class attribute can translate value0.00190.881110.0019
XML
Image XML parsing0.00020.112910.0002
General
dbfile0.01014.7928200.0005
String conversion0.00000.001830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs