There has been many posts regarding not displaying prices and ordering options until after a user logs in. I have just done it for a client and it is remarkably simple. Thanks of course to the wisdom of Paul C & Ningu.
I have set a standard install of Presta shop with the mod up so you can view it for your self.
Http://www.devtechchina.com/store
user login = demo@demo.com
password = 12345678
You will see that where ever a price or add to cart button should be displayed, it displays "login for prices and ordering options" until a user logs in and then all is displayed normaly.
How I have done it is as follows, and truly it is so simple.
I have added some php code to 4 tpl files. (thanks to Paul C for his php guidence)
Themes
product_list.tpl
product.tpl
Modules
Block special .... blockspecial.tpl
homefeatured .... homefeatured.tpl
the code involved is again very simple, just enclose any price of cart display code with
{if $logged} normal code is here
{else}
Login for Prices & Ordering Options
{/if}
That’s all there is to it. I have added the edited 4 tpl files this post for download, they are from the standard prestashop theme. You could use these or just see where the code edits are.
So now no prices of Add to cart button will display until a user logs in.
(of course if you want to use certain other modules that do display the price you will need to add the code to those also.
Now this presents an other problem, what’s to stop a user just registering automatically and then logging in? Well the fantastic Ningu gave me the solution for this. His great Customer registration module.
see here for the module
http://www.prestasho...tion_management
After implementing Ningu’s module this is the basic flow of what happens.
1: A user browses the store but can not see prices or ordering option.
2: User registers and prestashop emails them welcoming them and also that they CANNOT LOGIN until their account has been verified. Also store owner receives an email to let them know there is a new user waiting for verification.
3: Store owner verifies their account (or not) in the back office.
4: User receives a new email letting them know their account is now verified and they can login in.
5: They login and see prices and can order.
This setup is perfect for whole sale stores that do not want retail clients to see price etc.
I have done this mod on the latest release of Prestashop
I have tested this mod on the latest versions of
Firefox
Oprea
Safari for windows
IE 6 / 7
I do hope that this mod can help some prestashop users who want to set their shop as a wholesale store
Cheers
Geno
And great praise to the Presta team.




Back to top









