Zen Cart Logo
Forums / General Questions / Download to a mobile device - send link via email?

Download to a mobile device - send link via email?

Locked

Views: 1,325

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
6 Jul 2010, 8:17 AM
#1
tlittle avatar

tlittle

New Zenner

Join Date:
Jul 2010
Posts:
5
Plugin Contributions:
0

Download to a mobile device - send link via email?

Hi,

I'm trying to set up a simple "appstore" based on Zencart 1.38d. So far things are going well, but I've run up against a problem I can't solve, even after reading countless forum threads. To wit:

The customer buys an app (a piece of downloadable stuff) from the store. I'm using "download redirect" on a Linux system which works fine: The link to the software is created, the download button appears, the download works, etc. (The process is a little awkward, though, since the customer - as far as I can tell - has to switch to viewing his account to get a link that lets him find the download button. But I can live with that for now.)

My problem: I need to send an email to the customer when payment has been confirmed; the email needs to contain the download link. The customer will typically receive the email on his mobile device and click on the link to download and install the app on the device. How do I send the email? And how do I get the link into it?

And yes, I can see some potential problems with theft, but those will be be solved in most cases by tying the software to the specific mobile device using a license key. I'd be interested in comments from anyone who's tried (and preferably succeeded) to something similar.

Regards,
Tom

12 Jul 2010, 7:01 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Download to a mobile device - send link via email?

I've never done this myself, but what you're describing shouldn't be too hard. You'll want to have a look at the send_order_email() method in includes/classes/order.php. Starts at line 914 in the latest version.

This function generates and sends the email accompanying every successful order creation. The order_id for the new order is passed in, so just add an additional SQL lookup to find out if the order has any downloads, then build the link and include it in the email. The method itself will provide the template.

In case you need it, the table you need to look at is orders_products_download.