Drawing a blank here and I don't know if this is a zen cart question or a php question or both.
I want to add a session variable for both guest and logged in user. How/where would I do that?
Drawing a blank here and I don't know if this is a zen cart question or a php question or both.
I want to add a session variable for both guest and logged in user. How/where would I do that?
The full-time Zen Cart Guru. WizTech4ZC.com
What do you want to do with the session variable?
A hint would make this easier ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Ah, sorry. (I seem to be always apologizing on the forum when I post questions!)
I'm looking to set up the columns vs rows scenario for the product listing as a changeable thing for anyone. They will be able to change the listing display at will simply by clicking a button.
So I would need the session variable to be present immediately on site entry, I assume.
The full-time Zen Cart Guru. WizTech4ZC.com
You could probably add it to the bottom of the:
/includes/init_includes/init_session.php
with something like:
Code:// bof: set $_SESSION['my_session_variable'] if not previously set if (!isset($_SESSION['my_session_variable'])) { $_SESSION['my_session_variable'] = 'something'; } // eof: set $_SESSION['my_session_variable'] if not previously set
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Sure thing ... thanks for the update that this can work for you ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
In the interest of preventing clashes with core files, I'd suggest putting it in its own file, in two steps, like this:
a) /includes/auto_loaders/config.your_mod_name.phpb) /includes/init_includes/init_my_custom_init_code_here.phpCode:<?php $autoLoadConfig[115][] = array('autoType'=>'init_script', 'loadFile'=> 'init_my_custom_init_code_here.php');Code:whatever session code or other stuff you need to run
.
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.
Oh, good, I need that!
The full-time Zen Cart Guru. WizTech4ZC.com
I can't tell you how powerful that makes me feel! It worked!
The full-time Zen Cart Guru. WizTech4ZC.com
.
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.
Bookmarks