Jump to content

[MODULE] Purchase without registering (PrestaShop 1.3)


presta-dyr
 Share

Recommended Posts

Numerous times it has been mentioned that the checkout in PrestaShop lacks the option of purchasing without registering. You can find free as well as paid modules that solves this. However, they require you to change core files in PrestaShop. Typically authentication.php must be changed or even files in the classes directory. In my opinion this is not ideal especially because many servers (for a good reason) do not allow changing the core files when a module is installed. Furthermore it can get quite messy if you end up with a halfway installed/uninstalled module so you lose control with what files that have been overwritten.

Then I started playing with the thought that this problem could be solved with Javascript. My module hooks into the footer and dynamically adds a form to authentication.php so you can buy without registering. I make use of tpl files so you can translate the module to different languages as usual (currently I only support Danish and English).

I also make use of Javascript to fix CSS and hide the My Account block when you are buying without registering.

The password for the non-registered user is generated via MD5 from the user's name. A returning customer will be able to place and order as long as he/she uses the same name and e-mail address. But someone with only the knowledge of the e-mail address will not be able to login. If the user decides to use the "Forgot your password" function he/she can login and get access to the usual functions for a registered user.

The module is free.

EDIT: Version 0.3. Removed ini_set('display_errors', 1) and error_reporting(E_ALL) from authentication.php.

pwr_0.3.zip

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for sharing, I 'm going to test it ! :-)

EDIT: FIRST TEST

When I click on Fast Check out purchase
I have on top of authentication page some errors message about other modules
like:
Notice: Undefined variable: isDhtml in /homez.34/shop/www/my-shop/modules/blockcategorieselya/blockcategorieselya.php on line 122

  • Like 1

Share this post


Link to post
Share on other sites

Hi jolvil. You get the error messages because there is a bug in the blockcategorieselya. Also blockcategorieselya used relative paths so the (fancy) block with the categories disappeared when checking out. I have attached a fixed version of blockcategorieselya (based on the 02 version). I have also update the pwr module so the PHP notices are suppressed as usual.

doigro, The module only works with PS 1.3.

/Kjeld

blockcategorieselya.zip

Share this post


Link to post
Share on other sites

Hi On installing via upload module in admin/modules I get error when uploading as TAR "error while extracting module (file may be corrupted) "

When trying as zip I get file has not been installed contact your host.

Any idea why I can't install??

Thanks

Baz

Share this post


Link to post
Share on other sites

I tried to install this into another site I have and it is acting really weird. For some reason this module is having conflicts with other modules, particularly the blocksearch and also a thirdparty module called login and register by MarghoobSuleman.

When i have these 2 modules installed with this module it doesnt show the fast checkout box on the login screen. The only way I could solve the problem was to block these 2 modules from the authentication.php file.

Whats even more weird is that I have these 2 modules both installed on my other site, and dont get any conflicts with any modules.

All very confusing.

Share this post


Link to post
Share on other sites

I fixed the blocksearch, it was hooked into header and also top, when i removed it from header it was fine.

This is Marghoob's http://www.prestashop.com/forums/viewthread/57675/third_party_modules/module_login___register_panel_ajax_based.
I also have conflicts with the categories module, basically my site is acting all weird now.

It could be that the order the modules are installed do affect the way they work i will test it tomorrow and report back.

Share this post


Link to post
Share on other sites

Hi kolomvos.

Just add style="display:none" to the paragraphs you want to hide in authentication.tpl, like:

<p class="text" style="display:none">

/Kjeld


Thank you for your answer, however, this will hide the field for the e-mail but since it is required it will give an error that the e-mail is invalid. How do I change the required and optional fields?

Share this post


Link to post
Share on other sites

PrestaShop uses the e-mail as ID for the user. How do you want the user to enter his/her e-mail address if the field is hidden?

/Kjeld


That's the idea, I don't want the user to enter an e-mail address. Will there be a problem with his order?

Share this post


Link to post
Share on other sites

It`s not good idea. All informations about order, shipping, delivery, where customer can find it? Hm?

Of course You can add display: hidden; to email input and set email by default in authentication.php, for eg. orders@yourshop.com

Presta-dyr. I have idea.

Maybe create configuration page in module where You can choose some options? Like enabled required phone or purchase without email. It's easy to do, if You dont have enough time I will do this.

Share this post


Link to post
Share on other sites

It`s not good idea. All informations about order, shipping, delivery, where customer can find it? Hm?


They don't want to find it or they don't care. That's the whole idea of quick checkout or payment without registration. Costumers just want to buy, enter their address and done.

Is it possible to make the e-mail field not required?

Maybe then we could put some text below the e-mail. Something like "Entering your e-mail will help you in following your order" etc

Share this post


Link to post
Share on other sites

kolomvos, I get your point. I would never design my shop that way. If something goes wrong you can't contact your customer. But of course it could be done.

mir-aus, no I'm sorry. I have only made a 1.3 version.

podemsky, I didn't quite understand your question about .js?

/Kjeld

Share this post


Link to post
Share on other sites

kolomvos, I get your point. I would never design my shop that way. If something goes wrong you can't contact your customer. But of course it could be done.


Of course you can, that's why you ask for their phone number. Is it possible to tell me what should I do to so that the e-mail or any other field is not required?
Thank you.

Share this post


Link to post
Share on other sites

Prior to installing the OPC I installed the purchase without registration module. I uninstalled that and then someday installed the OCP and today I checked the MY ACCOUNT link and it has the purchase without registration stuck on it..! You can check it here -- > http://www.samalcosmetics.gr/eshop/prestashop/authentication.php?back=my-account.php

Share this post


Link to post
Share on other sites

Anybody tell me how to install pwr moudule?

I just unzipped pwr_0.3.zip file into my computer and copy those files in my web home directory via FTP.
authentication.php file and etc....
but I got some error message when I click checkout button...

like this...
Warning: include(/home/uhyunkyu/public_html/../../config/config.inc.php) [function.include]: failed to open stream: No such file or directory in /home/uhyunkyu/public_html/authentication.php on line 6

Warning: include() [function.include]: Failed opening '/home/uhyunkyu/public_html/../../config/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uhyunkyu/public_html/authentication.php on line 6

Warning: include(/home/uhyunkyu/public_html/../../init.php) [function.include]: failed to open stream: No such file or directory in /home/uhyunkyu/public_html/authentication.php on line 7

Warning: include() [function.include]: Failed opening '/home/uhyunkyu/public_html/../../init.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uhyunkyu/public_html/authentication.php on line 7

Fatal error: Call to a member function isLogged() on a non-object in /home/uhyunkyu/public_html/authentication.php on line 8

What is problem with this....?
Please, Help me~~~please....

Share this post


Link to post
Share on other sites

I'v got this message during install your moudule in Backoffice

When using module URL
"404 Module not found"

When using module file
"zip is not installed on your server. Ask your host for further information."

very very thanks your reply.

Share this post


Link to post
Share on other sites

I did manage to make this module work on 1.2.5 by removeing the following:

mpdules\pwr\authentication.php

remove Line 39
$validateDni = Validate::isDni(Tools::getValue('dni'));


I have done some tests and everything looks fine. I have been able to place orders with the created account more than one time.

Would be nice if the guys behind the code could tell me if my modification to the code will cause any trouble?

Share this post


Link to post
Share on other sites

i apreciate your work on that guest check out. and we see that also one page check out is an item.

both should be concidered to be core functionality in prestashop. we sell for the pleasure of our custumers - not to forget. this is the way to make money....

Share this post


Link to post
Share on other sites

Many thanks for your work, but:

What is the purpose of this module?
absence of a field for entering a password?

Maybe better to remove the entry field e-mail?
A buyer determine by order number or mobile phone

Share this post


Link to post
Share on other sites

Thank you very much!

But this module have a mistake: user can purchase without registration, BUT prestashop memorices their data:
If the user in the future wants to register appears the message "someboy has been registered with this email address"

Sorry for my bad english.. :P

Share this post


Link to post
Share on other sites



The password for the non-registered user is generated via MD5 from the user's name. A returning customer will be able to place and order as long as he/she uses the same name and e-mail address. But someone with only the knowledge of the e-mail address will not be able to login. If the user decides to use the "Forgot your password" function he/she can login and get access to the usual functions for a registered user.



From the author

Share this post


Link to post
Share on other sites

Hi, I am very new and I installed the module. However, when I click to check out, it opens a page asking a lot of info about the customer, apart from "personal information" there is also an address requirement and then "tax identification".

I am trying to sell digital downloadable products and I don't need any info but maybe just name, and email to say thank you and so on but no address or tax info necessary.

Is there a way I can delete those requirements?

Thank you.

Share this post


Link to post
Share on other sites

Nice way of handling things! (Javascript instead of modifying authentication.php)

Just some thoughts:

Would it not be more logical if you would automatically generate a random password (and mail it to the address)? If you receive an email from someone, you probably know his full name and e-mail address. Now, if you know he/she bought something on a site with this plug-in, you can generate the MD5 hash and start abusing the account. This will probably not happen a lot, but it might happen. It's not very secure IMHO.

Another way to get around the problem of reusing the account would be changing the e-mail to something like onepagecheckoutuser@site.com, and adding the real address to the comments section (so the shop owner can still send an e-mail to the buyer). The only problem would be telling PS to accept multiple registrations with the onepagecheckoutuser@site.com address.... anyone got a solution to this? (preferably without modifying PS itself).

Share this post


Link to post
Share on other sites

This module is exactly what I am looking for, however when i install it and attempt to use the fast checkout, it goes right to the full "Create Your Account" page. I have tested in both FF and IE and am running Prestashop v. 1.3.1.1

Any ideas?

Share this post


Link to post
Share on other sites

I have problem with this module. I don't see option to fast checkout, just to login and register. Module is installed well. It doesn't work just in my own theme. In original prestashop theme it works well. But I was changing just css file, add images for block headers and some small changes in product page. But nothing about authentification. And I remember that yesterday or before yesterday it worked well in my theme. What could be wrong? I don't understand :-(

Share this post


Link to post
Share on other sites

Thanks for this fine module!

I agree with what someone wrote above, since the info about the password recovery possibility is not written anywhere, how does the customer know the system has a password for him? After all no password was explicitly created in the one-time registration phase.

A more user-friendly way to do it would be to automatically send the generated password to the customer Email. The customer can always ignore it, but if he chooses to come back, we could save ourselves a lot of explaining about the fact that his account, in fact, exists in the shop, and was not so "single-use".

So Presta-dyr, would you consider adding the password Email feature for the reasons above? Thanks in advance if you do.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

the purchase without registering or fast checkout isn't really true to what it says. The free purchase without registering when installed the visitor clicks on a button witch takes you to a form just like when a visitors registers. ...It cuts out options like newsletter/ subscription and make it seem like a one click proccess but its not really! The visitor/custmer when using this fast lane checkout still fills the form witch then creates an account for that store. In some ways it's a good feature to have but I would recomend purchasing the paid version it looks better. it would be worth it if you want that feature. I also know first hand that on the free version there is an ssl issue and the free fast lane module will creat an error on the web page when enabled. The paid version requiers some skills as a webmaster. adding mysql tables and so on.

I would like to see a simple purchase without registering button witch has the option to use a short form for name email or takes you to the terms and agreement section then choose your payment. That would be nice!

Share this post


Link to post
Share on other sites

I have installed this and it works well....however, I really need a checkout that would go from the cart page directly to PayPal without entering any address or other info. PayPal is my only payment type and I only have one shipping option as well.

So, shop, go to cart, click checkout and that goes to PayPal payment page.

Does anybody know where I can get a module like this or modify mine?

Thanks very much!

Brian

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hi There,

I installed the module, it's great !!!

But when I choose "Bank Wire" Transfer I get an Error: "Invalid order or invalid order state".

But the Order process seems to be okay. The customer gets an email and the order will be insterted in the sstem. How can I solve this issue? I alread modified the "order-confirmation.php" like this:

if (!Validate::isLoadedObject($order) /*OR $order->id_customer != $cookie->id_customer */ OR $secure_key != $order->secure_key)
Tools::redirect('history.php');

But I had no success...

Regards,
Tobi

Share this post


Link to post
Share on other sites

I've installed the module, but I can't translate into Romanian. After I click on "Update Translations" the message "updates have been made" but everything remains the same.
Another problem is the e-mail address. Guest customer is unable to fast checkout twice with the same address.
Any ideas?

Share this post


Link to post
Share on other sites

Hello,

First af all - thanks for a great module! It works great but...I'm stuck with module position.

My problem is described in the attached file. I need to "move" the PWR module to the central_column, below the order steps.

pwr

As far as I understand I have to use somekind of hook but I can't get it to work as I want.

Thanks in advance for Your help.

regards

34903_lJlxsxAPR0A0iea7fS6S_t

Share this post


Link to post
Share on other sites

Hello,

I would like to sell digital downloadable products and I don’t need any informations but just name, and email to say thank you and so on but no address or tax info necessary.

Is there a way I can delete those requirements?

Thank you.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

This module is just what I am looking for. I have downloaded and installed it OK. The fast checkout section appears OK. But when I select the Make purchase button I get a 404 object not found. It's in ip/modules/pwr/authentication.php . I'm running this on my PC as my site is not yet active. I'm running 1.3.3.0 any ideas anyone? Thanks....

Share this post


Link to post
Share on other sites