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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    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
    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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    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.

  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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    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
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    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.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 15 Apr 2011, 08:56 PM
  2. Session info not updating for scripts outside of ZC folder after upgrade to 1.39
    By steel-track in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 15 May 2010, 06:34 AM
  3. Reading session variables outside of the zencart directory
    By refreshmentshop in forum General Questions
    Replies: 5
    Last Post: 22 Sep 2009, 09:53 AM
  4. A pretty weird problem while accessing session outside of zen
    By yellow1912 in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 1 Jul 2009, 02:44 AM
  5. How to get session/cart/login status outside of ZC?
    By scelerat in forum General Questions
    Replies: 0
    Last Post: 14 Nov 2006, 02:39 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR