Hi everyone,

I'm currently trying to set up Commerce File in an anonymous checkout way.

After the installation of Commerce File 7.x-2.x (because I need my anonymous users being able to download their purchased files directly on the checkout success page) I'm encountering a little problem, even after modifying the "Activates licenses of a free order" rule to auto activate the licence on any order, I can't download my file at the end of the purchase process.

I'm hitting a "Your license will be activated once your payment has been processed." on the checkout pane even with the "Bypass license control" activated for the anonymous users, I'm still stuck with this.

Anyone has already encountered this problem ? Maybe I'm doing something wrong but right now I'm pretty sure I looked at every possible configuration into my Drupal installation.

Is this a bug? I'm running on a 7.36 Drupal with the 7.x-1.11 Commerce module.

Thanks in advance!

Comments

jigish.addweb’s picture

"Your license will be activated once your payment has been processed" working properly and you do not require to set "Bypass license control".

This problem is generated because of file entity module not compatible with your commerce file module.

You need to alter your menu with your custom module

function YOURCUSTOMMODULENAME_menu_alter(&$items){
        if (empty($items['file/%file/download'])) { //replace with this line
                $items['file/%file/download'] = array(
                  'page callback' => 'commerce_file_download_page',
                  'page arguments' => array(1),
                  'access callback' => 'commerce_file_access',
                  'access arguments' => array('download', 1),
                  'type' => MENU_CALLBACK,
                );
        }
}

Let me know incase of any query/concern regarding this.

Thanks!

baktelraalis’s picture

Thanks Jigish,

I just updated the commerce_file.module file with the code you gave here (with commerce_file_menu_alter instead of YOURCUSTOMMODULENAME_menu_alter), but nothing changed.

I think I need to update the checkout success page with this code if it's possible. I want my anonymous users being able to download the file right at the end of the checkout process. Right now I still have "Your license will be activated once your payment has been processed".

I'm still searching how to patch this with your code.

Thanks again for the hint.

hoff331’s picture

@baktelraalis

On the checkout panes config page: admin/commerce/config/checkout, do you have the following panes:
License completion message
License information
Completion message

... as part of "Complete" section?

baktelraalis’s picture

Hi @hoff331,

yes I have those panes activated on my admin/commerce/config/checkout page, thanks !

My initial problem seemed to be fixed when I installed Commerce File 7.x-2.0-beta3+3-dev with Commerce 7.x-1.11 a few months ago.

But now my licences are well activated, I need to refresh my succeeded checkout page for the link to appear... supa weird !

I'm searching a solution right now.

I'm on a (weak) shared hosting, so I'm wondering if during the return process from Paypal my Drupal website is too slow to load the infos or something like that....

If anyone experienced those kinds of problem because of a shared hosting, please let me know :)

Thanks !

baktelraalis’s picture

A little follow up on my problem, it seems that I have some real troubles when Paypal and his IPN (Instant Payment Notification) come back to my server with a payment validation. Sometimes it can takes up to 10 attempts to Paypal to successfully send a HTTP/1.1 200 validation (I can see it in my Instant Payment Notification (IPN) history and in my server logs).

Right know I'm wondering again if my shared hosting is not too weak to support a Drupal website with Commerce in order to sell files...

Still, if you have any ideas or reflexions about the problem, I'm taking it !

Thanks.

winstonchurchil99’s picture

This patch solved the problem for me : https://www.drupal.org/node/2302897#comment-9274043

DamienMcKenna’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev