Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Password Protecting a Category URL?

Password Protecting a Category URL?

Locked

Views: 1,226

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
19 Sep 2008, 1:03 PM
#1
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Password Protecting a Category URL?

I don't know if this is really doable with ZC but here's my dilemma. I have a series of categories to my store and two of them need to be password protected so not everyone can shop in this section of the store. For example:

http://www.jamwestfoods.com/store/index.php?main_page=index&cPath=5

Is open to everyone.

http://www.jamwestfoods.com/store/index.php?main_page=index&cPath=6

Is supposed to be password-protected before you can see the content in this area since it's for wholesalers only and the items are different to boot.

So is it possible to assign a password prompt to appear when someone tries to attain this URL?

19 Sep 2008, 2:25 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Password Protecting a Category URL?

This would take some customization to control all of the products being displayed everywhere so that unless logged in and marked as a wholesaler no one can see the products in any section for New, Sales, Specials, Featured, Upcoming, Also Purchased etc. etc.

This would take a bit of thought, but it can be done ...

What version of Zen Cart are you running?

21 Sep 2008, 9:36 PM
#3
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Re: Password Protecting a Category URL?

I'm using 1.3.8. So it's the latest as of 9/21/08.

I did check out some similar threads and found this one:
http://www.zen-cart.com/forum/showthread.php?t=88819&highlight=password+protect

and followed the code where I inserted:

if (!$_SESSION['customer_id'] && ($cPath_new = '6')) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}

prior to:

return 'cPath=' . $cPath_new;

on the file: /includes/functions/functions_categories.php

But it didn't change anything. I uploaded the new file and clicked on Wholesale-->Retail which takes you to http://www.jamwestfoods.com/store/index.php?main_page=index&cPath=6

and nothing changed. Took me right to the page. Which isn't what I want at all.