Jump to content

shop access only for registered user


tijojoel

Recommended Posts

1) If you don't want to pay for a module, besides there are several others on paid addons site for VIP shops, than you need to adapt the code. This is a developing request and not a task between lines. You need to have knowledge of Prestashop's core architecture and php, SQL and css.

Take a look into controller files and you will be able to construct an override or module for your purposes.

Developer docu: http://doc.prestashop.com/display/PS16/Developer+Guide

 

2) Another simple, but not liable solution is the use of customer groups. How to  configure: http://doc.prestashop.com/display/PS16/Managing+Customers

Link to comment
Share on other sites

Products you can hide via caegory and than customer groups.

Search: you cannot hide and that it is why I wrote before: not liable solution

To use the site as "login first" you cannot do this without module or changes on code via override. if you are programmer should be an easy task (also wrote before). If you're not, than only by paid addon.

Link to comment
Share on other sites

vor 2 Stunden schrieb tijopromantia:

I think  we can hide the cart and search with some css tricks, is it possible?

You can do that very easy in the backoffice:

Go to backoffice-->modules-->position

Find the blocksearch module (and later also the blockcart module) in the DisplayTop section, click on edit

Then you can name the pages (in this case "index")where the module should not  be displayed in the "exceptions option"

regards
Whiley

 

Link to comment
Share on other sites

Make sure that "search" is not available on your site for non-registered users. By search you will find each product, also the one restricted to a group. Furthermore you should make sure that nobody will access your page by a link on serps. This will also disable all your efforts to "hide" your shop for non-registered users.

Link to comment
Share on other sites

And you have done this in the right section? In a default installation it's in displayTop

hidecart-1.jpg.1c650a4d6726f1b162aae90d12270879.jpg

 

hidecart-2.jpg.ff85ccb97ce6f601c4c21f132fe556e8.jpg

You have saved your changes?

You have deleted all cashes (smarty, extended, browser)?

I've several "private" customer-shops (PS 1.6.06 - 1.6.1.17) with this modification , for example this:

http://www.peggbr.de/

and I've tried this modification just now, in our demoshop, you can see the result here:

http://quintilius-varus.de/

 

regards
Whiley

 

 

 

Link to comment
Share on other sites

@Whiley Thank you for the prompt reply.

The problem now I am facing is:-

The url I want to hide search and cart is http://127.0.0.1/baps1/index.php?controller=authentication?back=my-account, and it is not working in this page.

When I load http://127.0.0.1/baps1/index.php it works but I want it in this url only -  http://127.0.0.1/baps1/index.php?controller=authentication?back=my-account, because when registered users goes to index.php they have to see the search and cart.

Edited by tijopromantia (see edit history)
Link to comment
Share on other sites

  • 6 years later...

If You want login and password for not logged users change:

classes/controller/FrontController.php

under

        if (self::$initialized) {
            return;
        }

        self::$initialized = true;

        parent::init();

 

add

    
    if (!$this->context->customer->isLogged() && $this->php_self != 'authentication') {
        Tools::redirect('index.php?controller=authentication');
    }

 

it will show only header and footer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...