Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2008
    Posts
    15
    Plugin Contributions
    0

    Default Location/Initialize Session Variable

    Since I'm coming over from the dark side (Windows/ASP), I could use some help in finding out how ZenCart sets "session variables." Specifically, let's use PRODUCT_NEW_LIST_DESCRIPTION for an example. I see in several places that the code

    if (PRODUCT_NEW_LIST_DESCRIPTION != '0') { <take some action>


    Where is this variable pulled from the database and how is it initialized?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Location/Initialize Session Variable

    Those are not session variables.

    That is a PHP constant, which is set based on a configuration key by the same name set in the configuration table in the database. Those configuration keys are set via the Admin interface -- most of them under the Admin->Configuration menu choices.

    The correct place/way/method to set/change that setting is via the admin UI.
    .

    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. v154 Naming a global variable the same as a SESSION, GET or POST variable
    By torvista in forum General Questions
    Replies: 5
    Last Post: 6 Dec 2015, 11:11 AM
  2. how to add a new session variable?
    By delia in forum General Questions
    Replies: 11
    Last Post: 13 Oct 2011, 02:51 PM
  3. Possible IE9/session variable issue?
    By pfabrick in forum General Questions
    Replies: 1
    Last Post: 11 May 2011, 10:00 PM
  4. Initialize session
    By SWFu in forum General Questions
    Replies: 1
    Last Post: 23 Apr 2009, 02:25 PM
  5. Customer session variable
    By 4ecomm in forum Managing Customers and Orders
    Replies: 4
    Last Post: 12 Oct 2007, 05:36 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