No registration with downloads question

  • Posts: 151
  • Thank you received: 9
11 years 9 months ago #56312

Hi,

I configured the checkout process: "No Registration".
When a user buys a downloadable product, he/she receives a download link in the confirmation mail after succesful payment.

When this link is clicked the site/webshop opens with the message to logon first!

Of course with No Registration, there is no logon.

How to solve this?

Thank you,
Maurice

Last edit: 11 years 9 months ago by Maurice.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 9 months ago #56388

Hi,

You can't use "no registration" for downloadable goods. You should use "simplified registration" instead. The checkout will be the same but the user will have an account created for him and he will be able to login to download the files.

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

  • Posts: 151
  • Thank you received: 9
11 years 9 months ago #56840

Hi Nicolas,

I'm sorry but that is totally unacceptable. We offer our customers "No Registration", which means no hassle for them when they checkout. No storage of their information, etc.

When I set the checkout configuration to "Simple Registration", nothing changes BUT the customer cannot checkout because the system says that a name already exists when he/she fills in their e-mail address. This forces me to show a login box and that creates confusion and again not a "No Registration" situation.

Just to compare: in Virtuemart, when you buy a downloadable product, you receive a downloadcode and a link to the downloadpage. With this code you can download the product just from the front page, without the need to log in. In the back end you can configure how many times the code can be used and when it expires. The download page verifies the downloadcode and offers the file, which is stored outside of the web root. This works very fine and it would be a very great plus if Hika offers something like this too.

So WHY is a login needed for a download product and not for a physical product? I don't understand that.
There must be a way to leave the checkout process to "No Registration" AND offer downloads too.

Please help.

Maurice

Last edit: 11 years 9 months ago by Maurice.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 9 months ago #56867

Hi,

The system checks that the user has the right to download the file based on the order of the user. So it needs to be able to identify the user via his user account.
There is no such "download code" system in HikaShop. It's on the todo list, like many things but you won't be able to do that with the options currently in HikaShop. That would require the development of that feature. I can't provide a two lines piece of code as it will require a lot more than that in order to support it.

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

  • Posts: 151
  • Thank you received: 9
11 years 9 months ago #56872

Hi Nicolas,

I understand that. Thank you.

I have two php code snippets that can be used to:

- generate a unique download code.
- construct a download page (front-end module) where the customer can enter the unique code to download the file ordered.

Here's how it works:

code generation:
When an order changes status to confirmed, instead of the current link that is put in the mail, the script generates a unique download code and stores this code in a new table called downloads alsong with the file associated with this order and some variables like expiration time/date, # of downloads.

If there are more items in this order, the scipt depends on the order item iteration in the the current code and generates a code for each order item.

The unique code(s) is/are then put in the e-mail that goes to the customer.

downloading
The code that constructs the downloadpage, handles the download. When the user enters the unique code here, the scripts checks it's validity in the table, how many times the file may be downloaded, expiration time, and if all are valid, offers the download and updates the table.

Pretty straightforward.


Can you tell me where your code currently generates the download link?
I do have decent PHP and MySQL programming knowledge and experience and want to create the above in some overrides.

Thank you,
Maurice

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 9 months ago #56900

In that case that will be easy.

1. You can create a hikashop plugin and implement that function :
www.hikashop.com/en/support/documentatio...l#onAfterOrderUpdate
I invite you to check the history plugin in order base yourself on it.

2. You will have you have your own page for that. The best is to actually have your own component. But it can be a bit complicated for just one page. If instead you were to add a controller/view in HikaShop, joomla would delete it when you would update HikaShop so I don't recommend that.
An alternative is to create a joomla content plugin which would replace a specific tag with your form, like other joomla content plugins. Then, you can add a link to then article with a menu item and a link in the user control panel of HikaShop to that menu with the onUserAccountDisplay hikashop event, like in the user_account plugin of hikashop.

The links in the emails are generated in the emails (folder media/com_hikashop/mail).

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

  • Posts: 35
  • Thank you received: 1
11 years 7 months ago #66992

Maurice, Nicolas,

Was there any progress on that? This is a very important requirement for me and I just realized that Hikashop isn't equipped to do that yet.

Any help would be appreciated...

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 7 months ago #67122

We didn't work yet on that feature. It's still on our todo list for the future.

Maurice must have moved forward on his solution I suppose.

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

  • Posts: 151
  • Thank you received: 9
11 years 7 months ago #67291

What I did is the following:

Buy, install and configure HikaSerial.
With every download product, now a serialnumber is automatically generated and sent to the customer when the order has been confirmed (paid).

I renamed the word "serial" to "downloadcode" everywhere in the language file (override).

I created a separate module where the customer can enter (front-end) the serial without the need to log in. (because they don't have a login since the HikaShop checkout config is set to "No Registration".


The module checks the serial for validity, expiration (difference between current datetime and order datetime) and of course which product the serial is attached to. If all is valid, the module grabs the file from a location that is outside of the web root and offers it as download to the browser. If the serial is invalid, an errormessage appears with the reason why it is invalid.

Although this is working fine for me, I still hope the HikaShop team will create an official downloadmodule themselves.

Maurice

The following user(s) said Thank You: bohemier

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

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

Hi Maurice,

Thanks for sharing your solution. I decided to take a different approach, as I wanted my users to be able to simply click on a link in the order email they get. For anyone interested, here's what I did.

My solution is divided in the following parts:

1) A plugin called downloadlink of type hikashop that responds to onAfterOrderUpdate. Its job is to generate a unique id (I use the uniqid php function) once the order is verified as confirmed. For this, I created a new table: hikashop_downloadids with 3 columns: download_id (primary key), file_id+order_id (unique)

2) A hikashop controller called download.php whos job is to handle option=com_hikashop&ctrl=download&downloadid=X urls. It essentially does the same thing as ctrl=order&task=download with the same validity checks (number of downloads, time period, etc), but uses downloadid to identify the file to download and doesn't require logging in.

3) Modify order_status_notification.html.modified.php in media/com_hikashop/mail (or through the admin interface) to query for the proper downloadid and rewrite the download url that is sent by email. I added some SEF by calling JRouter to prettify my url like so: www.mysite.com/shop/download/downloadid-65347216578

Works great for me. I know I added a file to hikashop (the download controller) but didn't modify any of the existing ones. When updating hikashop the file stays there (at least it did when I updated from 1.5.9->1.6.0 and 1.6.0->2.0.0) .

Source code? Just pm me...

Cheers

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

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

Argh I just purchased Hikashop today, under the assumption that digital goods/downloads were taken care of by e-mailing a code/link to a download-page after purchase (or something like that). Isn't that the way it is usually done?

I suppose I should have done my research more thoroughly (e.g. should have read this thread!). I was browsing through all the options today and still think it is a wonderful product. Just not yet for downloads in my opinion.

I really hope that there will be an solution for this soon. 1) Registering, 2) checking your e-mail and activating the account, 3) logging in and then 4) (finally) finishing the purchase proces is way too complex and a dealbreaker for the product I'm offering (an e-book).

Erik

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

  • Posts: 151
  • Thank you received: 9
11 years 5 months ago #78846

Hi Erik,

With HikaShop only, you can simplify this process into:

Simplified registration. (set Joomla to NOT use confirmation for new accounts)

Customers order and when they do they are automatically logged in to Joomla. (and a cookie is placed)
(They do not have to confirm the account creation, since Joomla is set to not use confirmation.)

Then they receive an e-mail with a download link. When they click this, they go back to the site and the download starts.
If all is good, they are still logged in and the download starts immediately. If they are not logged in anymore, they must log in. They should have received an automatic generated password when they registered.

The above is standard solution for Hikashop.

If you want it exactly the way you want, you can use Bohemiers solution or mine. This will make life a little easier.

Kind regards,
Maurice

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

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

The solution I have implemented works well... It could be easily integrated into Hikashop. What do you think Nicolas?

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

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

Hi Maurice,
Thanks (Wow - that was quick!) I have to say that I am very reluctant to not requiring some sort of confirmation for new Joomla-registrations.

In fact this is exactly what I tried today, and believe it or not: within two hours I had two weird new user-registrations with fake e-mail adresses. (there must be some bots sniffing around for easy Joomla-registrations). So I prefer to stay away from that path.

If Hikaserial works well together with your module I would certainly be willing to give it a go. (Would you be prepared to share that module with me?)

Anyway, I'm with you and also 'still hope the HikaShop team will create an official downloadmodule themselves.'

Cheers,
Erik

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

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

Hi Bohemier, I just sent you a PM. I'd be very keen on trying your solution for this as well.
Cheers,
Erik

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

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

Hello Erik,

Here is what you need to do:

1) Install the attached plugin (downloadlink.zip) via Joomla's extension installer
2) Put download.php directly into your joomla's installation at /components/com_hikashop/controllers
3) I have supplied a sample email template (order_status_notification.html.modified.php) that you can put in /media/com_hikashop/mail/. It will output the download links in the order notification email. It is based on Hikashop 1.6's template.

I have included the database creation inside the plugin. It's not optimal but is the easiest way... Please bear in mind that uninstalling the plugin will not remove the table. You will have to remove it by hand, ex: jos_hikashop_downloadids. It seems that the proper way of handling the sql at install and uninstall is to create a Joomla component installer... perhaps I will do that later.

Hope this helps

Attachments:

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

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

Great! Thanks a lot, Bohemier! It's much appreciated.

I'm 'on the road' for a couple of days, but I'll soon let you know how things went.

Once again, thanks for sharing :-)

Cheers,
Erik

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

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

Hi Bohemier,

I must be doing something wrong:

I renamed "order_status_notification.html.modified.php" to "order_status_notification.html.php" (and made a backup of the original file).

When I make a test-order, this is the problem that occurs:

If I change the order status to 'confirmed', it does send the notification e-mail, however without a download ID in the URL (which leads to a 500-error). When I change it back to - for instance - "pending", and afterwards again to "confirmed" it sends a proper notification e-mail with the ID included.

Do you have an idea what might be going wrong here?

Thanks,
Erik

The following user(s) said Thank You: bohemier

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

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

Hi Erik,

Leave the file name as it is with the modified.php. Hikashop will look for this one first and use it over the default one. You can also access those overrides in the email configuration. Let us know if this works.

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

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

Hi Bomemier,

I changed the filename back (to order_status_notification.html.modified.php), but it still doesn't work. The script doesn't insert the downloadid for some reason. The url in the e-mail is like:

mydomain/index.php?option=com_hikashop&ctrl=download&downloadid=

Any idea what could be causing this?

Thanks for all your help,

Erik

PS: maybe this is of importance:
Hikashop 2.0.0
Joomla 1.5.26

Last edit: 11 years 4 months ago by Erik09.

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

Time to create page: 0.111 seconds
Powered by Kunena Forum