i can add to chart, make a checkout, pay and so on....everything goes ok...

but in myfiles page i cannot see file purchased....

Comments

The.Clue’s picture

im digging inside the code, i made a fresh drupal install, i tried dev and stable branch....purchased files won't appear in my files section after purchasing...i definitively have no idea on how to handle it....

tom-d’s picture

I am experiencing the same problem for both rc versions, 5.x-3.0-rc1 4.7.x-3.0-rc1. After creating the file download product it spits out in green


    * stdClass Object ( [nid] => 4 [vid] => 4 [uid] => 1 [created] => 1173136902 [type] => product [changed] => 1173136902 [title] => file [body] => ga [format] => 1 [ptype] => file [price] => 0.00 [sku] => [hide_cart_link] => 0 [fpath] => 1005.mp3 [edit_size] => Array ( [0] => 1234728 ) [sid] => 1 [anon_policy] => 0 [log] => [name] => tom [date] => [status] => 1 [promote] => 1 [sticky] => 0 [revision] => 0 [preview] => Preview [op] => Submit [submit] => Submit [form_token] => d49f3eb29eafd9160683ac5cba047c09 [form_id] => product_node_form [comment] => 2 [menu] => Array ( [title] => [description] => [pid] => 1 [path] => [weight] => 0 [mid] => 0 [type] => 86 ) [teaser] => ga [validated] => 1 [is_new] => 1 )
    * Anonymous policy for this product has been reset to Registered only.
    * stdClass Object ( [nid] => 4 [vid] => 4 [uid] => 1 [created] => 1173136902 [type] => product [changed] => 1173136902 [title] => file [body] => ga [format] => 1 [ptype] => file [price] => 0.00 [sku] => [hide_cart_link] => 0 [fpath] => 1005.mp3 [edit_size] => Array ( [0] => 1234728 ) [sid] => 1 [anon_policy] => 1 [log] => [name] => tom [date] => [status] => 1 [promote] => 1 [sticky] => 0 [revision] => 0 [preview] => Preview [op] => Submit [submit] => Submit [form_token] => d49f3eb29eafd9160683ac5cba047c09 [form_id] => product_node_form [comment] => 2 [menu] => Array ( [title] => [description] => [pid] => 1 [path] => [weight] => 0 [mid] => 0 [type] => 86 ) [teaser] => ga [validated] => 1 [is_new] => 1 [oldsid] => )
    * Your Product has been created.

When I look at the file product page that was just added it seems like the file wasn't added at all.

The.Clue’s picture

yep...same here...

it seems that someone forgot to remove a var_dump()... :)

neclimdul’s picture

print_r but yeah, that was me. Doesn't have anything to do with the problem. Can you run your cron and see if that fixes the problem? I believe subscription products are updated to available through the cron hook.

The.Clue’s picture

cron ran...niet....my files page is still empty as a playboy bunny's head...

tom-d’s picture

yep same here

The.Clue’s picture

diggin on db.....

perhaps myfiles list is empty because ec_recurring_* tables in database are ALL empty (and they are supposed to be not, i think...)....

tom-d’s picture

neclimdul pointed out that the transactions aren't completing, and thinks it isn't the file.module thats got a problem its somewhere the store module. I have no idea where to start with this so I guess I will have to just play the waiting game.

Sophia’s picture

Yup, same here :)

neclimdul’s picture

Priority: Critical » Normal

Ok talked to gordon and he found a problem in COD then I found some more. So then we tested this with COD and all works again. My bet, Tom mentioned using Paypal. Its likely that Paypal isn't posting an IPN to your test site and you're payment status is never getting triggered. There for the transaction is never getting moved to the states that need to happen to trigger the files showing up on the my files page.

I'm going to talk to the EC devs about a couple of usability features we might try to get this working better.

Lowering priority since this does actually work as intended at the moment just poses a usability problem.

The.Clue’s picture

i use COD and paypal, too...
but files wont show up even after i (eventually) change transaction status to complete by hand...

gordon’s picture

If you manually complete the transaction, do the files show up?

Also if you want the COD module to complete the transaction, which it does not do by default, you need to change the settings on administer > E-Commerce configuration > C.O.D. so that it will do this.

Sophia’s picture

True, I use PayPal too, but just for testing purposes I added COD. No matter what, files NEVER show up, I tried to manually change the purchase status but they just plainly refuse to show up. I would be willing to give installation specifications if wanted; my shop is quite useless at the moment so I would definitely give this a "critical" status :)

BTW kudos for the hard work you guys are doing, wish I could contribute but I can't program!

tom-d’s picture

For me the files still do not show up even if I manually complete the transaction

neclimdul’s picture

COD prior to yesterday was bugged and did not work.

The.Clue’s picture

COD or paypal doesn't matter...files wont show up

PS i always update to latest CVS before submitting a follow up :)

i agree with Sophia, tnx for all the support guys. Lemme open the zend studio and try to help you finding this nasty bug :)

BUT i'll switch to critical again....lot of stores, like mine!, are offline for this ;)

The.Clue’s picture

starting to dig....while frustrating since i don't know drupal framework and i'm starting basically from the ABC...

anyway, this query in file_my_overview() return always zero rows:

SELECT etp.title, epf.size, epf.fpath, ere.expiry FROM {ec_transaction} t JOIN {ec_transaction_product} etp ON etp.txnid = t.txnid JOIN {ec_product_file} epf ON epf.nid = etp.nid JOIN {ec_recurring_expiration} ere ON ere.vid = etp.vid AND ere.txnid = etp.txnid WHERE t.uid = 1 AND t.workflow = 6 AND ere.status = 0 AND rid <= 0 ORDER BY t.txnid DESC

because ec_recurring_expiration table is definitively empty

The.Clue’s picture

replace that query with this one:

$result = db_query('SELECT etp.title, epf.size, epf.fpath
    FROM {ec_transaction} t
      JOIN {ec_transaction_product} etp ON etp.txnid = t.txnid
      JOIN {ec_product_file} epf ON epf.nid = etp.nid
    WHERE t.uid = %d AND t.workflow = %d '. tablesort_sql($header), $uid, EC_WORKFLOW_COMPLETED, $status);

WARNING: This is not a fix! This basically ignores expirations! This is just a TEMP workaround i did for my estore before going to bankrupcy ;) I think others may need a quick way to have ecommerce file download work again that's why i added here. But this workaround MUST be removed after the recurring table bug was discovered and fixed.

tom-d’s picture

Thanks the.cube, I also really need this to work, I'm not really sure how to use this temp solution though any hints?

I hope this bug can be fixed soon.

jonathan_hunt’s picture

FYI, this is working for me on 5.x-3.0. If you haven't done so, you need to edit the file product instance and ensure a renewal schedule is selected. e.g. a 1-week schedule with no expiry means the files will expire after purchase after 1 week.

neclimdul’s picture

Version: 5.x-3.x-dev » 5.x-3.0
Priority: Normal » Critical

ok, so the problem is you didn't have an expiry schedule. that's something to work on. I'll see if I can take a look at it this week.

tom-d’s picture

Thats really great, thanks jonathan_hunt! I was a bit confused with the schedule, it seems to work like a charm now! ^^

So if you dont put anything in schedules it doesn't show the file, I tried fiddling with scheduling in a few earlier versions with no luck.

maybe some documentation would be handy.

tom-d’s picture

Thats really great, thanks jonathan_hunt! I was a bit confused with the schedule, it seems to work like a charm now! ^^

So if you dont put anything in schedules it doesn't show the file, I tried fiddling with scheduling in a few earlier versions with no luck.

maybe some documentation would be handy.

The.Clue’s picture

even if some schedules are set up in related ecommerce config page, when creating a new file product it's not possible to link one of them to creating product...

the selectbox is empty...

spazfox’s picture

I'm experiencing the same problem reported by The.Clue above. Files do not show up (regardless of whether I use COD or PayPal and regardless of whether the transaction is completedly automatically or manually), and when creating or editing a file product, the expiry schedules I created do not populate the "Renewal schedule" drop-down list. I'm using a clean install of Drupal 5.1 and ecommerce 5.x-3.0.

Taking a peak at file.module, I discovered this comment in the middle of the file_ec_settings() function (which begins around line 216):

$slist = array_merge(array(0 => '--'), ec_recurring_get_list(FALSE));
// TODO Implement the code to use this feature.
$form['ec_file_default_schedule'] = array(

Has the code to use the recurring/schedule feature with file products simply not been written yet? I'm not a programmer, so I really can't tell, but the comment suggests this! :) Anyone working on this?

Thanks again for a great module and the great support!

spazfox’s picture

I'm experiencing the same problem reported by The.Clue above. Files do not show up (regardless of whether I use COD or PayPal and regardless of whether the transaction is completedly automatically or manually), and when creating or editing a file product, the expiry schedules I created do not populate the "Renewal schedule" drop-down list. I'm using a clean install of Drupal 5.1 and ecommerce 5.x-3.0.

Taking a peak at file.module, I discovered this comment in the middle of the file_ec_settings() function (which begins around line 216):

$slist = array_merge(array(0 => '--'), ec_recurring_get_list(FALSE));
// TODO Implement the code to use this feature.
$form['ec_file_default_schedule'] = array(

Has the code to use the recurring/schedule feature with file products simply not been written yet? I'm not a programmer, so I really can't tell, but the comment suggests this! :) Anyone working on this?

Thanks again for a great module and the great support!

neclimdul’s picture

The TODO doesn't have anything to do with this. That is an initial setup to allow for a default value to be passed to ec_recurring. But I didn't have time to implement the default value passing code in ec_recurring. That's life.

neclimdul’s picture

Title: purchased files don't show in user files' list » purchased files without schedule don't show in user files' list
Version: 5.x-3.0 » 5.x-4.x-dev
Assigned: Unassigned » neclimdul
Status: Active » Patch (to be ported)

Fixed in commits 61330 and 61329 for 4.7.x-3 and 5.x-3.

Needs to be ported forward.

spazfox’s picture

Thanks for the patch. This fixed it so that the purchased file now appears in the "My files" list, but I'm still having the problem that the "Renewal schedule" dropdown when editing or creating a file product is not populated by the expiry schedules I created previously (so that I cannot assign a schedule to a file product).

neclimdul’s picture

This is probably because your schedules have renewals. Files can't renew. I'll try to come up with some to document that better but not on this thread..

spazfox’s picture

Ah, that was it. Changing my schedule to non-renewing allowed it to appear in the renewal schedule dropdown. Thanks much for the clarification.

gordon’s picture

Status: Patch (to be ported) » Fixed

This has now been ported to 4.x-dev

Anonymous’s picture

Status: Fixed » Closed (fixed)
esadot’s picture

I'm about to upgrade E-Commerce from 5.x-3.0 to 5.x-3.1, and i was wondering whether or not http://drupal.org/cvs?commit=61329 made his way to 5.x-3.1 release?

Thanks in advance

Phillip Mc’s picture

just to confirm that the patch/workaround for this problem posted by clue... (http://drupal.org/node/124640#comment-521464 ) works with ec version 3.x-dev.

Phillip Mc’s picture

just updating this thread:

#35 the patch does solve the problem of the files not appearing in the my files page, but, the download link doesn't work for some of the files....I think I have narrowed the problem down to the ec_recurring module inserting the wrong data into the ec_recurring_expiration database table. In other words, when an order is placed and there is more than 1 file in the shopping cart, only the 1st file product appears in the my files page, because the ec_recurring_expiration table data is incorrect.

I'm still looking for a solution...but, I hope that helps others who are confused by this.