Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Default Add a members only area

    Our members can have access to our premium podcasts. Thus, I'd like to add a members only area. Since the members will use zencart to purchase their memberships, I wanted to place the code under the store.

    The members area needs to have dynamic pages that display a list of the latest premium podcasts taken from the database. Thus, these changes don't seem like a candidate for ezpages?

    I think that it would possible to create these pages by cloning an existing includes/modules/pages directory such as account_history and then modifying the files in that directory, adding the new pages to filenames.php, anything else? However, I'm not sure how to handle the MODIFY code such as at the end of the pages there's the line:

    $zco_notifier->notify('NOTIFY_HEADER_END_CHECKOUT_SUCCESS');

    I can add the line for my new module:
    $zco_notifier->notify('NOTIFY_HEADER_END_MEMBERS');

    but where do I add the code to tell it what to do when that page is finished?

    Also, I'd like to add a _SESSION variable of when the membership expires when the user logs in. Do zen developers forsee any problems of adding _SESSION variables (as long as they don't conflict with existing _SESSION variables)?

    Is there a better way of doing what I want to do?

    Thanks,
    jdl

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Add a members only area

    You're on the right track. I don't see any wrong assumptions there.

    You'll likely benefit from reading the "program flow documentation" contribution in the downloads section esp to understand how modules/pages files relate to template files, as well as various developer references in the wiki.

    Also, studying the "about_us" contribution will give you a quick reference of which files work together to constitute a new "page" in Zen Cart.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    help question Re: Add a members only area

    Dr. Byte,

    Thank you very much for your response!

    I'm glad that you mentioned the documentation. I found a document that describes exactly what to do:

    http://www.zen-cart.com/archived_con...ur_website.pdf

    Do you mind posting the link to the program flow documentation? I couldn't find it.

    Thank you,

    jdl

  4. #4
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    help question Re: Add a members only area

    Dear Dr. Byte,

    It appears that the architecture has changed a little since the about us pages were added.

    When I run my header_php.php file for my members pages, I get this error message:

    Fatal error: Call to a member function notify() on a non-object in ..\store\includes\modules\pages\members\header_php.php on line 12

    That line is:

    $zco_notifier->notify('NOTIFY_HEADER_START_MEMBERS');

    I did a search for NOTIFY_HEADER and it appears that this line is called at the beginning of each modules page's php_header.php file.

    Do you know what might be causing that error?

    Thanks,

    jdl

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Add a members only area

    As I doubt you'll be using the notifier subsystem on those pages in the early stages, you could just leave out the $zco_notifier->.... lines at top and bottom of the page ... for now anyway.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Add a members only area

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Default Re: Add a members only area

    Thank you again! Commenting out the 2 lines did the trick.

    Thanks also for the link to the documents!

    jdl

  8. #8
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Default Re: Add a members only area

    Dear Sensei,

    I think I've reached the point where I need a few pointers on how the zco_notifier works.

    Each week we release new member files. On the main members page, I'll display a list of categories. When the user selects a category and presses the submit button, I'll call the same page with a query string such as

    https://www.edufone.com/store/index....embers?pod=B15

    However, this is just bouncing the user to the store/index.php page. I've looked at the program flow 1.3.x document (this latest version? ). It has a lot of helpful information but I didn't find anything that would help me figure out how the post mechanism is working.

    Thanks again,

    jdl

  9. #9
    Join Date
    May 2006
    Posts
    59
    Plugin Contributions
    0

    Default Re: Add a members only area

    I just realized that I can probably do what I want with the zen_redirect(zen_href_link()); mechanism.

    jdl

 

 

Similar Threads

  1. Members only area
    By jlong in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 8 Jan 2011, 07:11 PM
  2. members only: hiding the products from non members
    By poosk in forum General Questions
    Replies: 2
    Last Post: 18 Nov 2009, 04:17 PM
  3. members only area
    By Derek Bryant in forum Templates, Stylesheets, Page Layout
    Replies: 33
    Last Post: 14 Sep 2009, 04:50 PM
  4. Replies: 7
    Last Post: 3 May 2007, 04:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg