Keeping track of number of e-goods downloads
I've added a bit to the customer/dowload.php file to track the number of successful downloads for each download key. First I added a number_downloads (tinyint,not null,default 0) field to my xcart_download_keys table. Then I modified my customer/downloads.php file to update the count after a file is successfully downloaded. The code below was already a heavily modified version of the customer/download.php page before I added the download counter code...the original version supplied with x-cart didn't work for me...note, that this is for xcart version 3.3.1, but might work with newer releases, you'll have to decide that for yourself.
Code:
<? |
minorgod,
good mod 8) have you built a module to be able to view these results in the orders area to see whether every order has been satisfied? |
nope, but...
No, I haven't been that motivated to do it. I've been building some x-cart admin tools that reside completely outside of x-cart so that in the future, when I upgrade x-cart, I don't have to customize the entire admin side of it in addition to the customer front-end. At worst I'll just have to change how a few of my own scripts interact with x-cart, but since I wrote them all, I know it will be easier than modding some of the x-cart code which is just plain difficult in some cases...like creating a custom login page. GRRRRRRR. I'm still working on that login problem which I will be posting example code for in the next hour or so. No progress, but I'm simplifying the code to be a generic gateway so you can quickly install and test on your server by just changing a few variables in a config file. It'll be ready shortly so hopefully you'll have time to take a look at it and see if you can see why it doesn't work right.
|
All times are GMT -8. The time now is 11:38 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.