Vote for v1.5 Fixes

PrestaShop Forum: Build a free online shop. Count on the Community!

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum: Build a free online shop. Count on the Community!

Jump to content

 
Photo

[MODULE] Purchase without registering (PrestaShop 1.3)


  • Please log in to reply
115 replies to this topic
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1583 posts

Posted 11 September 2010 - 09:15 PM

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.

Attached Files



jolvil

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2804 posts

Posted 12 September 2010 - 08:10 AM

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
PS 1.3.7.0

robkwal

    PrestaShop Apprentice

  • Members
  • PipPip
  • 437 posts

Posted 12 September 2010 - 06:09 PM

This module works fine for me... Version 1.3.1!!!

Thanks for the contribution!!!

Regards,

Rob

doigro

    PrestaShop Apprentice

  • Members
  • PipPip
  • 73 posts

Posted 12 September 2010 - 07:17 PM

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?

PS - 1.5.6


presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1583 posts

Posted 12 September 2010 - 07:34 PM

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

Attached Files



ukbaz

    PrestaShop Apprentice

  • Members
  • PipPip
  • 171 posts

Posted 13 September 2010 - 06:48 AM

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

presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1583 posts

Posted 13 September 2010 - 06:53 AM

If you're on a Windows system try installing 7-zip. Unpack the file locally and transfer the directory via FTP to the modules directory on your server.

/Kjeld

jhnstcks

    PrestaShop Fanatic

  • Moderators
  • 2050 posts

Posted 13 September 2010 - 07:33 AM

Works perfectly for me, no problems at all.

I shall add it to freeprestashopmodules.com today.
Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

jhnstcks

    PrestaShop Fanatic

  • Moderators
  • 2050 posts

Posted 13 September 2010 - 08:43 AM

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.
Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1583 posts

Posted 13 September 2010 - 03:34 PM

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

jhnstcks

    PrestaShop Fanatic

  • Moderators
  • 2050 posts

Posted 13 September 2010 - 06:56 PM

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.prestasho...nel_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.
Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

kolomvos

    PrestaShop Apprentice

  • Members
  • PipPip
  • 36 posts

Posted 13 September 2010 - 07:13 PM

Hi, is there a way to remove the e-mail option? Or any other field? Like tax identification?

raulibi

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts

Posted 13 September 2010 - 08:18 PM

It works very well, thank you for your contribution.
Regards

4webs.es

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1630 posts

Posted 13 September 2010 - 08:46 PM

Very good module.Thanks

presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1583 posts

Posted 13 September 2010 - 08:47 PM

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

kolomvos

    PrestaShop Apprentice

  • Members
  • PipPip
  • 36 posts

Posted 14 September 2010 - 05:26 AM

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?

presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1583 posts

Posted 14 September 2010 - 05:30 AM

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

Krystian Podemski

    PrestaShop Apprentice

  • Members
  • PipPip
  • 429 posts

Posted 14 September 2010 - 06:05 AM

Well done Presta-dyr. Recently adopted the same tactics as you are when it comes to creating modules. What is the core try to change with .js

I like the way you have done this module.

Once again - good job. Thank you.
I make useful, good-looking web stores at impSolutions
Check my PrestaShop Modules
Themes on: themeforest.net/user/prestahome/portfolio

kolomvos

    PrestaShop Apprentice

  • Members
  • PipPip
  • 36 posts

Posted 14 September 2010 - 06:09 AM

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?

Krystian Podemski

    PrestaShop Apprentice

  • Members
  • PipPip
  • 429 posts

Posted 14 September 2010 - 06:16 AM

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.
I make useful, good-looking web stores at impSolutions
Check my PrestaShop Modules
Themes on: themeforest.net/user/prestahome/portfolio




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users