Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

download before complete


Guest

Recommended Posts

Hi I dont think this has bee posted before but I am sorry if it has. I think I have found a bug to do with the linking of download files. When a order has been placed and before the order has been completed ie payment completed. If the customer logs out without payment and then logs back in they can download the file by using Previous Orders. Even if the order was not complete and paid for there is a link on the bottom of the order information giving a download link.

 

This is not good as the customer can by pass payment and download the file all the same.

Is this a bug or down to the way I may have set something up. :huh:

 

Thank you for your assistance. :thumbsup:

Link to comment
Share on other sites

Is this using Paypal IPN ?

 

Thank you but I am using IPN and set paypal to redirect the customers back to the shop however customers dont need to get to the payment part before they log off or close IE. If the customer does this then goes back to the shop logs back in they can view the order still in Previous Orders ie pending payment but with the link to the file at the bottom of the page of the pending payment order.

 

Is this only me I? If so I must be doing somthing daft as normal lol :rolleyes:

Link to comment
Share on other sites

Note customers place order adding to shopping, continue to cart and before geting to Finished! close IE or log out. Loge back in look at Previous Orders click on view bt, of order is a link to Download links and the file customer needs. So the customer can downlod before payment. :blush:

Link to comment
Share on other sites

Queue downloads so that they have to be released by yourself - after you have confirmed the order is valid.

 

:) This sounds like a top solution but I must be daft. How can I set up Queue downloads as you have described?

 

I would be much obliged if you could point me in the correct direction. :blush:

 

Again thank you for your help.

Link to comment
Share on other sites

I think I found a fix for this, It seams to work but as I normally code in ASP it has taken me a small bit of learning to do.

 

If you look in the account_history_info.php found in the catalog and edit the line below

 

if (DOWNLOAD_ENABLED == 'true' ) include(DIR_WS_MODULES . 'Downloads.php');

 

For this one

 

if ($order->info['orders_status'] <>'Pending' && DOWNLOAD_ENABLED == 'true' ) include(DIR_WS_MODULES . 'Downloads.php');

 

It stop this problem by looking for Pending (ie Pending payment).

 

Note more than likely I have missed something so may be some of the mod makers here can correct it. Note this works ok in english so I dont know if and when the languages change that the word Pending wil as well. :-"

 

 

Well hope this helps. :thumbsup:

Link to comment
Share on other sites

I think I found a fix for this, It seams to work but as I normally code in ASP it has taken me a small bit of learning to do.

 

If you look in the account_history_info.php found in the catalog and edit the line below

 

if (DOWNLOAD_ENABLED == 'true' ) include(DIR_WS_MODULES . 'Downloads.php');

 

For this one

 

if ($order->info['orders_status'] <>'Pending' && DOWNLOAD_ENABLED == 'true' ) include(DIR_WS_MODULES . 'Downloads.php');

 

It stop this problem by looking for Pending (ie Pending payment).

 

Note more than likely I have missed something so may be some of the mod makers here can correct it. Note this works ok in english so I dont know if and when the languages change that the word Pending wil as well. :-"

Well hope this helps.  :thumbsup:

 

 

Almost perfect for my problem although I had to change 2 things in the code to make it right (for me)

Change Downloads.php to downloads.php and the <> to ==

 

Thank you

 

Steve

Link to comment
Share on other sites

  • 8 months later...
Hi I dont think this has bee posted before but I am sorry if it has. I think I have found a bug to do with the linking of download files. When a order has been placed and before the order has been completed ie payment completed. If the customer logs out without payment and then logs back in they can download the file by using Previous Orders. Even if the order was not complete and paid for there is a link on the bottom of the order information giving a download link.

 

This is not good as the customer can by pass payment and download the file all the same.

Is this a bug or down to the way I may have set something up. :huh:

 

Thank you for your assistance. :thumbsup:

 

The change is best done in /includes/modules/downloads.php - Change line 57 (in my version anyhow!) to:

 

if ( ($downloads['download_count'] > 0) &&  (($order->info['orders_status'] !='Pending') && (pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME) != 'checkout_success.php')) && (file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) && ( ($downloads['download_maxdays'] == 0) || ($download_timestamp > time())) ) {

 

 

The following have been added:

$order->info['orders_status'] !='Pending')

**Only allow download from customer Order Page when status isnot 'Pending'

 

pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME) != 'checkout_success.php'

***Don't allow download straight away from the checkout_success page whatever..

This needs to be more finely tuned to check if a CC has been approved by a gateway and if the payment is therefore guaranteed then show the link. I got lazy fro now :-)

Link to comment
Share on other sites

The change is best done in /includes/modules/downloads.php - Change line 57 (in my version anyhow!) to:

 

if ( ($downloads['download_count'] > 0) &&  (($order->info['orders_status'] !='Pending') && (pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME) != 'checkout_success.php')) && (file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) && ( ($downloads['download_maxdays'] == 0) || ($download_timestamp > time())) ) {

The following have been added:

$order->info['orders_status'] !='Pending')

**Only allow download from customer Order Page when status isnot 'Pending'

 

pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_BASENAME) != 'checkout_success.php'

***Don't allow download straight away from the checkout_success page whatever..

This needs to be more finely tuned to check if a CC has been approved by a gateway and if the payment is therefore guaranteed then show the link. I got lazy fro now :-)

 

 

will this work on a store that allows downloads straight away? While waiting for someone to manually approve may seem like a vialbe work-around to some here, the reality is that:

1. In this day and age people are used to paying for their downloads and then getting them immediately. The competition does, and if you can't do it as well.. you'll lose business.

2. ONce your store reaches a certain level, it will be impossible to go through and manually approve every download, which would defeat the purpose of setting up a download store in the first place.

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

you could allow downloads always as long as you properly setup your checkout process so the customer cannot bypass the payment gateway. It can be fully automated.

 

But if you have say a cc at the office or a cod module installed then you have to manually approve them.

Link to comment
Share on other sites

you could allow downloads always as long as you properly setup your checkout process so the customer cannot bypass the payment gateway. It can be fully automated.

 

But if you have say a cc at the office or a cod module installed then you have to manually approve them.

 

 

so would any of the above fixes work with paypal IPN and downloads set to automatic?

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

I believe with the IPN contribution in particular (the one I tried) you could allow downloads right away. And with the default osc download code because you should not be able to bypass the checkout.

 

That automatic setting you mentioned comes from a download contribution you have?

Link to comment
Share on other sites

I believe with the IPN contribution in particular (the one I tried) you could allow downloads right away. And with the default osc download code because you should not be able to bypass the checkout.

 

That automatic setting you mentioned comes from a download contribution you have?

 

 

I'm using the PayPal IPN Contribution and the Downloads Controller Contribution.

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

First check if there is a way to bypass your checkout procedure before start changing your modules. Can someone end up in your checkout_success page without paying?

Link to comment
Share on other sites

I'll PM you... if you don't mind

Ok I see, make sure you have the changes of the download controller in the checkout_process.inc.php of the IPN. Then configure the controller to allow downloads when the order is in delivered or processing state. (Not pending). Then set the IPN when it stores the process orders its default value to be processing or delivered. And try it.

Link to comment
Share on other sites

okay... I can't try it right now because I'm at work (though you'd never know it from me posting all over the place... :D )...

 

But I will try it when I get home and get back to you on it.....

 

thanks...

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

Quick question. Are you refer to a new update of the downloads controller?

no it's just both contributions modify the checkout process. And the IPN uses a different file the one I mentioned. So port the changes in that file too.

Link to comment
Share on other sites

no it's just both contributions modify the checkout process. And the IPN uses a different file the one I mentioned. So port the changes in that file too.

 

 

My download controller has also been modified to handle album downloads so I guess in my case, it would be best to not touch anything and get the developer to take a look at this, correct?

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...