No registration with downloads question

  • Posts: 35
  • Thank you received: 1
11 years 5 months ago #81289

Hi Erik, Just a few quick thoughts: did you enable the plugins? Do you see a hikashop_downloadids table inside your database? Is it populated?

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 5 months ago #81290

Hi Bohemier,

I enabled "Angelicode Hikashop Download Link Plugin".

The hikashop_downloadids table is populated with download_id's, file_id's and order_id's. I noticed that the records are added to the table after an order is set to "confirmed".

Also, I forgot to tell that I'm using Hikashop 2.0.0 and Joomla 1.5.26 .

Cheers,
Erik

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 5 months ago #81294

Hi Bohemier - maybe it is also important to note that I am testing with the "HikaShop bank transfer payment plugin". I guess in most cases payment plugins will be set to automatically change the order-status to "confirmed" when the payment has been made.

In my (test) case, I first have to check the bank-account and then manually set the order status to "confirmed" in the back-office. I noticed that this is the moment the script updates the "hikashop_downloadids table." Perhaps the script is composing the e-mail before the record has been properly added to the table? Just a thought.

Thanks,
Erik

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 1
11 years 5 months ago #81430

hi Erik,

Yes the script activates the download ids when the order is marked ad confirmed. Do you get the email before or after you mark it as confirmed? Did you try to send the email again once it is marked as confirmed?

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 5 months ago #81442

I get the email after I change the status to "confirmed."

And yes, when I change the status back to pending, and then again forward to "confirmed", it DOES send an correct email with a proper url (with download_id) included.

Thanks,
Erik

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 1
11 years 5 months ago #81448

Hi Erik,

What is your "Valid order statuses for download" setting under System-Configuration-Files tab? Mine is set to shipped,confirmed. The plugin acts when the order is updated and will check for the status before creating the downloadids. If the status is not one of those listed, it will not create the downloadids.

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 5 months ago #81478

Mine is set to shipped, confirmed as well. This works fine, because when I change the order status to confirmed the e-mail is sent, however without the download_id. That's funny, because when I check the "hikashop_downloadids table" it always has added the record with the download_id correctly.

It looks as if the script sends the e-mail out, before it has had a chance to update the table properly. Maybe the script should be paused for two seconds before it starts composing the e-mail? I don't know..

Thanks,
Erik

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 1
11 years 4 months ago #82090

Humm I have the same setup, Hikashop 2.0.0 and J 1.5.26. Can you try to use the paypal payment plugin to see if it works?

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 4 months ago #82111

Hi Bohemier,
I enabled a paypal payment plugin. I never configured my Paypal account properly, so I cannot complete the order proces by making a real payment. This is what I did:

  1. Created a new order
  2. Choose paypal as payment option
  3. Went into backend and manually changed the status of the new order into "confirmed"
  4. Checked the download_ids table: record with new downloadID is correctly added

Same problem: the e-mail I received contained all the information, EXCEPT the downloadid.

I even added some text to "order_status_notification.html.modified.php", just to make sure that that it uses the right file:

$url = "index.php?option=com_hikashop&ctrl=download&downloadid=$downloadid";
$url = JRoute::_($url);
echo 'ADDED SOME TEXT TO CHECK HERE <a href="'.$url.'">'.$fileName.'</a><br/>';

Everything appears in the email, only $downloadid doesn't seem to have a value.

Once again, thank you very much for all your help.

Erik

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 4 months ago #82151

Hi Bohemier,
I just managed to determine the source of the problem (more or less): It's in the manually-updating of the order status.

In order to reproduce my problem try this:

  1. set "bank transfer" as payment option
  2. make a new order with bank-transfer,
  3. go to backoffice->orders and manually change the status to "confirmed" (don't forget to check "Notify customer" in the popup window)
  4. check your e-mail. If I'm not mistaken, the downloadid will not be included in the url.


The more I think of it, the more it makes sense: when you manually update the order status, the e-mail is already composed (as you can see in the popup window) before you press "OK". Only after pressing OK, the downloadID is created.


I hope this makes sense. Thanks again :)

Last edit: 11 years 4 months ago by Erik09.

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 1
11 years 4 months ago #82215

Hi Erik,

Ahh yes it makes sense now. Actually it doesn't make sense that hikashop generates the email before changing the status when manually changed in the admin area. When the payments are processed automatically (ex: paypal), it's the other way around, i.e. the order status is changed, then the email is generated. To me, this is more logical like this, but what's strange here is that Hikashop has an inconsistent behavior. Nicolas, I think this should be fixed somehow? I realize it isn't an easy one...

So, the way to solve this is to generate the downloadids upon order creation. This will populate useless ids (ex: when an order is created but never paid), but I have added some code to the plugin to delete the ids when the order is deleted.

Here is the new plugin... thanks for your input Erik.

Attachments:
The following user(s) said Thank You: Erik09

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 2
11 years 4 months ago #82262

Well, thank YOU Bohemier! It works very well now!

One question about appearance: right now it shows the download-popup with a blank page at the back. Would there be an easy way for my template to be shown in the browser instead of the blank page? (I suppose there must be a 'view' added in addition to the controller, I just don't know how to do that)

Nothing important though, it works fine the way it is.

Cheers!
Erik

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 1
11 years 4 months ago #82266

Great, I'm happy it works better now. :)

I didn't have time to look into this blank page issue yet. I don't think that the view would have any impact, except if the controller has any uses for it, which isn't the case of the download controller as it is now.

Perhaps the view parameter could be used to redirect the page somewhere... That remains to be done! You're welcome to try something and post back the results...

Cheers

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum