Jump to content
presta-dyr

[MODULE] Purchase without registering (PrestaShop 1.3)

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.

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

Share this post


Link to post
Share on other sites
On 1.2.5 i get this error message:

Fatal error: Call to undefined method Validate::isdni() in /home/______/public_html/modules/pwr/authentication.php on line 39

Can you fix this for 1.2.5, please?

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

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
If you're on a Windows system try installing [url=http://www.7-zip.org/]7-zip[/url]. Unpack the file locally and transfer the directory via FTP to the modules directory on your server.

/Kjeld

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
Hi jhnstcks.

Perhaps the order in which you install the modules makes the difference? Is the blocksearch placed in the top as usual? Do you have link to the module by MarghoobSuleman?

/Kjeld

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
[quote author="presta-dyr" date="1284407248"]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[/quote]

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
[quote author="presta-dyr" date="1284438602"]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[/quote]

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
[quote author="podemski" date="1284441419"]It`s not good idea. All informations about order, shipping, delivery, where customer can find it? Hm?
[/quote]

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 [b]not[/b] 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
[quote author="presta-dyr" date="1284447072"]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.
[/quote]

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
Guest
This topic is now closed to further replies.

×