I'm really stucj on this problem...if anyone can help it would be appreciated...I'm using ecommerce 4.3-dev and using ec_recurring for file download products.
I've tried all variations of renewal schedules..i.e. no renewals, unlimited renewals and 1 renewal, all with the same results..i.e. when I add more than 1 file product to my cart and checkout, it only seems to display 1 file on the MYFILES page...
I've done a little digging around and I notice that the `ec_recurring_expiration` table doesn't look correct. I.e. I think the ec_recurring.module is inserting the wrong data into the tables...see below an example transaction, where 3 recurring file products were part of the transaction:
txnid: 7 Start_time: 1221559200 vid: 1 rid: -2 expiry: 1221645600 status: 2
txnid: 7 Start_time: 1221645600 vid: 2 rid:-1 expiry: 1221732000 status: 2
txnid: 7 Start_time: 1221732000 vid: 3 rid:0 expiry: 1221818400 status: 0
Only 1 of the recurring files appears in my MYFILES page..i.e. vid:3.
I also notice that the Start times aren't all the same, which is strange as the transaction took place at the same time for each recurring product (i.e. the 3 items were all part of transaction id number 7).
I've trawled through the ecommerce issues queue, to no avail. If anyone can tell me which function I should be looking at it would be a great help...
This problem renders the file product option on Drupal ecommerce redundant and ec 5.x-4 is still in development...so any pointers really appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | file.module.txt | 23.07 KB | Dublin Drupaller |
Comments
Comment #1
Phillip Mc commentedjust bumping this.....I'm totally stuck on this issue and ecommerce version 5.4 is still in major development...any ideas anyone?
Comment #2
Phillip Mc commentedjust updating this issue:
I've tried the following versions of ecommerce and the same problem exists in all versions:
It appears that selling more than one file download using ecommerce simply doesn't work. Selling an individual file download only appears to work but there are other modules, like quickfile that does that with much less code. In other words, when you add more than 1 file download to your cart and checkout...the myfiles page, where the customer downloads the purchased files, is missing some of the files.
Anyone able to shed some light on this?
I'm genuinely very suprised that nobody has picked up on this for almost a year - since 5.x-3.4 was released. Surely somebody must be using the ecommerce modules to sell file downloads?
Comment #3
Dublin Drupaller commentedhey phil. i've emailed you this, but thought i would share on here..
Here's a mod I came up with a while back for a music shop I was working on.
It overrides the ec_recurring.module renewal settings for file.products and uses a combination of the transaction payment date (when the payment was completed) and an expiry duration for files, which can be set by site admins on the ADMIN -> ECOMMERCE CONFIGURATION -> FILE settings page.
The music shop is still a work in progress, but, I have tested these mods on a test shop.
Notes:
--------
1. These changes override the ec_recurring.module renewal settings for file products.
2. The expiry date is calculated using the transaction payment_date field..i.e. when the order payment was completed and an expiry duration determined by site admins on the ecommerce file module settings page
3. The expiry duration options include 30 minutes, 1 hour, 6 hours, 12 hours, 24 hours, 2 days or 3 days.
(30 minutes is just useful for testing purposes)
3. The expiry duration is a site-wide setting...at the moment it cannot be specified for individual files.
4. No database changes are required.
5. The myfiles page now combines both expired and active file downloads on the same page.
6. Tested using Drupal eCommerce version 5.x-3-dev.
7. Unlikely to be updated for eCommerce version 5.x-4 because that is a complete rewrite of the Drupal
eCommerce suite of modules.
8. Attached is a patched version of the file.module (v 1.37.2.7.2.1.2.16 2007/08/03 02:48:35 gordon), just rename from file.module.txt to file.module and upload to your ecommerce/file folder on your server and then
go to ADMIN -> ECOMMERCE CONFIGURATION -> FILE
Patch 1
replace the entire function called file_ec_settings() (line numbers 244-271 in the file.module) with the following mod.
Patch 2
Replace the entire function called file_my_overview with the following mod. Note that this should really use the views.module to display the files, but, it works.
Patch 3
Replace the entire function called ec_file_may_download with the following mod.
hope that helps others
Comment #4
Phillip Mc commentedbrilliant. thanks dub.
quick question: how does the site know the files are expired?
If you are overriding the ec_recurring renewals option for file downloads, what happens during cron runs? do files still 'expire'or are they still sitting there but just not linked to?
thanks again.
Comment #5
Dublin Drupaller commentedthe patch includes an override in the may download function....i.e it runs a quick check against the payment date and expiration time to see if the file has expired or not.
dub
Comment #6
davea commentedThere are several versions of ec mentioned here. I am not sure which one it applies to. Please update with the version that this issue applies to.
Thanks
DaveA
Comment #7
sammys commentedHi Phillip,
Unfortunately, the ec_recurring_expiration entries above don't paint a complete picture of what is wrong. The top two show a status of 2 (meaning they've been renewed). There are meant to be other entries in that table with a status of 0 (zero: meaning they are active/unexpired).
Please paste all entries, in ec_recurring_expiration relating to those product vids (1, 2 and 3).
Thanks.