Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2010
    Posts
    10
    Plugin Contributions
    0

    Default Checking Customer Login status from my Flash application?

    Hi-

    I want to use the same login as the zen cart store. I made a flash application so customers can choose custom colors for embroidery patterns they are ordering- http://iandi.com/shop/color_picker.php

    When the customer clicks "Save Colors" a php script runs that should check if the customer is logged into Zen Cart. I've tried accessing $_SESSION['customer_id'] and printing all session variables but they are always empty. Right now the flash movie is in the root of my shop folder, but I can put it anywhere...this seems like it should be something straightforward but I've searched & tried suggestions for a few hours with no luck. any help is appreciated- thanks!

    -xana

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Checking Customer Login status from my Flash application?

    When and how do you run your PHP script?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Oct 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Checking Customer Login status from my Flash application?

    in the action script:
    var request:URLRequest = new URLRequest ("http://iandi.com/shop/welcome.php");
    request.method = URLRequestMethod.POST;


    then welcome.php checks the session:
    if (isset($_SESSION['customer_id']))
    echo "loggedin=true";
    else
    echo "loggedin=false";

    I've determined that the script does run, but doesn't ever return a value in the session

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Checking Customer Login status from my Flash application?

    Your script needs to run /includes/application_top.php if you want it to start and access a Zen Cart session.
    .

    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
    Oct 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Checking Customer Login status from my Flash application?

    I added include("/includes/application_top.php"); to the php script but I'm still not getting a value for $_SESSION['customer_id'].

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Checking Customer Login status from my Flash application?

    You won't if you're not logged in.
    .

    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
    Oct 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Checking Customer Login status from my Flash application?

    I tried logging in, out, and in again. still nothing coming up in my session variable.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Checking Customer Login status from my Flash application?

    Not sure what to tell you. It works for me.
    Maybe your problem is with the Flash component.
    .

    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: 3
    Last Post: 9 Jun 2015, 10:36 PM
  2. Customer login status
    By familynow in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 8 Nov 2011, 08:47 PM
  3. Replies: 0
    Last Post: 27 Dec 2008, 05:30 AM
  4. Customer shop status: must login to browse
    By red hot in forum Basic Configuration
    Replies: 4
    Last Post: 15 Jul 2008, 07:58 PM

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