Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Posts
    3
    Plugin Contributions
    0

    Default Where can I set a new variable?

    Hi there,

    My clients have asked me to deliver them 'two shops in one'. What they mean by this, is there should be two site designs reflecting the two types of products they sell. I am thinking of using different colour schemes and making the one design flow from the left, the other from the right. This way there is a unified look to the whole shop, but it will be clear which section or 'shop' they are in at all times.

    So how to do this in zencart?

    I am thinking of having two links in the masthead (shopone | shoptwo ) and when they are clicked a variable is set. Then, when the main page loads, i replace the table on the main page with an if and include statement, ie

    if $shop is set to 1
    then include file one
    else
    include file two

    This way the display of the main content of the page is altered according to their selection.

    So my question is:

    How and where do i set a variable in zencart so that it will persist throughout the site, whatever page the user browses to?

    many thanks if anyone could help me with this,

    dan :-)

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

    Default Re: Where can I set a new variable?

    PHP session variables persist until the session is ended or they are explicitly unset.

    Have you read the text files in your css directory? They explain how to create different styling for each product or section of your site.

    You can also force different templates based on, for example session variables, but also GET values (useful if you're changing things using links) by amending the init_templates.php file.
    Kuroi Web Design and Development | Twitter

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

 

 

Similar Threads

  1. where can i add a global custom email variable
    By eVelt in forum General Questions
    Replies: 1
    Last Post: 19 Dec 2013, 06:22 PM
  2. Replies: 17
    Last Post: 27 Apr 2008, 05:04 PM
  3. Where can I set defaults for new products?
    By mrbert in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 30 May 2007, 03:15 PM
  4. Where can I set the ENTRY_TELEPHONE_MIN_LENGTH?
    By jdl in forum General Questions
    Replies: 4
    Last Post: 11 Jun 2006, 04:28 PM

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