Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    11
    Plugin Contributions
    0

    Default Session Var's outside store

    I have my store in a directory www.mywebsite.com/rockstore
    but my main website www.mywebsite.com/index.php i would like check to see if the person is logged into zencart.

    i noticed the login/logout and my account uses this line of code

    <? if (isset($_SESSION['customer_id'])) { ?>

    but when i put that line of code into my main index.php it doesn't see that there is any existing session var's

    i did print_r($_session); and there is no session var's when i do print_r from my main index.php but when i put print_r into my /rockstore/index.php it has this whole list of session vars.

    can anyone point me in the right direction of what files i need to "include" and what not so that my main index.php i can check to see if the person is logged into zen cart.

    thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    60,405
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: Session Var's outside store

    You'll have to include includes/application_top.php
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Aug 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: Session Var's outside store

    alright i put that in my main index.php and it says

    Not Found
    The requested URL /~paradigm/zc_install/index.php was not found on this server.

    sorry.

  4. #4
    Join Date
    Jan 2004
    Posts
    60,405
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: Session Var's outside store

    true enough ... Zen Cart is designed to be run directly, not remotely. Thus all its paths are relative, and not absolute.
    That error indicates it cannot find the configure.php files where it was looking.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



  5. #5
    Join Date
    Aug 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: Session Var's outside store

    so then is there "any" way i can do what i mentioned above?

  6. #6
    Join Date
    Jan 2004
    Posts
    60,405
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: Session Var's outside store

    If the files you're trying to run it from can be run from within the Zen Cart folder, it may be simpler, since Zen Cart is built around using relative paths, not absolute paths, to access its files.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Jan 2004
    Posts
    60,405
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: Session Var's outside store

    Or you could just hack apart all the sessions functionality from within Zen Cart to duplicate it outside the cart... which can be an ugly process if you're not well-versed in PHP session coding.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



 

 

Similar Threads

  1. moving the store
    By Erica in forum General Questions
    Replies: 2
    Last Post: 23 Aug 2006, 09:10 PM
  2. Advice on best way to migrate store
    By glanceup in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 15 Aug 2006, 10:21 AM
  3. Session confusion
    By babzog in forum General Questions
    Replies: 2
    Last Post: 30 May 2006, 02:48 AM

Bookmarks

Posting Permissions

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