Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
shaddragon

DownloadsController Immediate Downloads Unavailable

Recommended Posts

Using: osCommerce 2.2ms2

DownloadsController 5.3 ms2.2

 

I've been trying to fish this bug out of the existing files, and I'm finally coming up stumped. With free products - free price and free shipping - orders are processing just fine right through confirmation, but on completion of confirmation, the download link isn't available. The only way to make it available is for an admin to manually change the update status.

 

It isn't that the update status is setting wrong; I checked that. It's that wherever the product is supposed to update for download_maxdays and download_count, it's not, so the if-statement that checks to see whether it should display the plain or linked version is getting an invalid result for the datestamp. Only the manual updating is setting the maxdays and count variables; prior to that, the order is being set with both at 0, which I presume is normal. I haven't been able to track down where the freecharger presumably ought to set them on confirmation so that the download link is immediately available. (Nor figured out whatever I've screwed up so that they're not getting set.)

 

Any help is much appreciated - I've been stumped on this for a couple of days now.

Share this post


Link to post
Share on other sites
Using: osCommerce 2.2ms2

DownloadsController 5.3 ms2.2

 

I've been trying to fish this bug out of the existing files, and I'm finally coming up stumped. With free products - free price and free shipping - orders are processing just fine right through confirmation, but on completion of confirmation, the download link isn't available. The only way to make it available is for an admin to manually change the update status.

 

It isn't that the update status is setting wrong; I checked that. It's that wherever the product is supposed to update for download_maxdays and download_count, it's not, so the if-statement that checks to see whether it should display the plain or linked version is getting an invalid result for the datestamp. Only the manual updating is setting the maxdays and count variables; prior to that, the order is being set with both at 0, which I presume is normal. I haven't been able to track down where the freecharger presumably ought to set them on confirmation so that the download link is immediately available. (Nor figured out whatever I've screwed up so that they're not getting set.)

 

Any help is much appreciated - I've been stumped on this for a couple of days now.

 

I am working on the same issues. You will find that the status comes from the payment section.

 

What I am trying to do is if the customer is downloading demo software I would like to do it this way.

1. Customer adds demo software to cart.

2. Checkout if no account then create one else login.

3. Once customer is in system then goto download file link.

 

Sounds simple Ha!

 

So if anyone has tried this or has a work around lets here about it.


If only I could remember that.

Share this post


Link to post
Share on other sites
What I am trying to do is if the customer is downloading demo software I would like to do it this way.

1. Customer adds demo software to cart.

2. Checkout if no account then create one else login.

3. Once customer is in system then goto download file link.

 

I've seen that done, not that that helps much-- at <a href="http://www.drivethrurpg.com/catalog/index.php">DriveThruRPG</a>, specifically, which I'm reasonably sure is running an osCommerce version or derivative. (Wish I could be more help than that.)

 

On my own problem... I finally discovered that the ultimate problem was that the last_modified wasn't setting at all, presumably some sort of problem in checkout_process.php. The section modified by the download controller,

'last_modified' => 'now()',

'date_purchased' => 'now()',

should be setting last_modified identical to date_purchased. Instead, date_purchased sets, but not the other. I'm utterly and completely baffled by this. Theoretically this query still ought to work - at least everything I read of it in tep_db_perform seems in order.

 

I finally solved it by the inelegant workaround of adding

 

tep_db_query("update ". TABLE_ORDERS . " set last_modified = now() where orders_id = '" . $insert_id . "'");

 

just after the $insert_id below the array, and that worked. If anybody has <i>any</i> clue why the original variant might not work, I'd love to hear it - things that inexplicably don't work are usually a bad sign.

Share this post


Link to post
Share on other sites
I've seen that done, not that that helps much-- at <a href="http://www.drivethrurpg.com/catalog/index.php">DriveThruRPG</a>, specifically, which I'm reasonably sure is running an osCommerce version or derivative. (Wish I could be more help than that.)

 

On my own problem... I finally discovered that the ultimate problem was that the last_modified wasn't setting at all, presumably some sort of problem in checkout_process.php. The section modified by the download controller,

'last_modified' => 'now()',

'date_purchased' => 'now()',

should be setting last_modified identical to date_purchased. Instead, date_purchased sets, but not the other. I'm utterly and completely baffled by this. Theoretically this query still ought to work - at least everything I read of it in tep_db_perform seems in order.

 

I finally solved it by the inelegant workaround of adding

 

tep_db_query("update ". TABLE_ORDERS . " set last_modified = now() where orders_id = '" . $insert_id . "'");

 

just after the $insert_id below the array, and that worked. If anybody has <i>any</i> clue why the original variant might not work, I'd love to hear it - things that inexplicably don't work are usually a bad sign.

 

Thanks for the info

:thumbsup:


If only I could remember that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×