Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    63
    Plugin Contributions
    0

    Default use session variables on product page?

    Hi!
    Would be sooo great if anyone could help me on this:

    I want to check the country where a user which is from while logged in on the tpl_products_info.php page. Therefore i thought about using session variables but unfortunaltely i don't know which session variables are accessible or how they can be made accesible on this page.

    I want to do something like:
    "if user is from denmark then do this and that...."


    I would love it if someone could point me in a direction!

    sven
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

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

    Default Re: use session variables on product page?

    The variable to use is:
    Code:
    $_SESSION['customer_country_id']
    The value of that variable will match the corresponding country_id in your "countries" table in the database.
    .

    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 2009
    Posts
    63
    Plugin Contributions
    0

    Default Re: use session variables on product page?

    Thank you drByte! Great! You helped me a lot!
    Thumbs up!
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

 

 

Similar Threads

  1. Product listing- Pulling variables to use in custom jscript
    By strelitzia in forum General Questions
    Replies: 3
    Last Post: 6 Nov 2011, 09:27 PM
  2. Login session variables
    By xtjx09 in forum General Questions
    Replies: 5
    Last Post: 14 Aug 2010, 04:47 AM
  3. Using Session variables to populate Product attribute fields.
    By efmathis in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 18 Sep 2008, 07:38 PM
  4. Add Session Variables
    By santoshshaw in forum General Questions
    Replies: 1
    Last Post: 8 Nov 2007, 11:31 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