Zen Cart Logo
Forums / General Questions / Very First Page

Very First Page

Views: 2,532

Results 21 to 25 of 25
19 Aug 2014, 14:05
#21
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Very First Page

DivaVocals:

add a clock? need a better explanation..

If I want to put a clock on my shopping cart that says the time, your local time, and want it to stay showing, do I put the SWF file and scripts etc in""/includes/templates/YOUR_TEMPLATE/common/html_header.php"?

19 Aug 2014, 14:08
#22
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Re: Very First Page

Is there a thread that explains the order at which the pages are loaded for the home page etc? E.G. the construction of the home page. If there is I could get a better understanding of Zencart and I would stop asking very stupid questions. :D

19 Aug 2014, 14:13
#23
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Re: Very First Page

mc12345678:

If the clock code needs to be in the area between <head> and </head>, then that code portion could be loaded there. If you're just looking to put a clock up and thinking that html_header is the place because it has html and is at the top of the page, no.

Where would it best be put?

19 Aug 2014, 14:27
#24
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Very First Page

adb34:

Where would it best be put?

So, I know there is still an open question of a link to explain the sequence and structure of the cart loading, which is likely to help. I usually get around understanding this through review of the indes.php file which processes the input and conditions, loads files that then also load files, etc... I thought I had seen something that provided a breakdown of the process for a general cart, but I also think that it was on someone's "personal" website when I had looked a few years back.

Regarding the location(s) to put calls to your "clock" or other features. Assuming you wanted saaya a javascript clock where the time presented is a "consistent" with the current time (seconds incrementing) then there are probably portions og that code that should be in the html_header file or loaded only when a particular page is/was being displayed. Typically the "active" portion would then be loaded in a file that is associated with the template object being displayed. To have said object (clock) display on every page, typically the display portion would be in one of the includes/templates/YOUR_TEMPLATE/common files dependent on where on the page it is to be displayed.

Sorry to be so generic, but seems more like a learning situation compared to a specific fix.

19 Aug 2014, 15:45
#25
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Very First Page

adb34:

Where would it best be put?
Your questions are NOT stupid.. they are VAGUE.. It helps folks to not have to GUESS at an answer if you would post the DETAILS of what it is you are trying to do so an intelligent and ACCURATE answer can be supplied..

So let's start with you giving an idea what this code you want to include looks like.. This will help us help YOU figure out where is the best place to put it.. Then you can tell us do you want this ONLY on the home page or on EVERY page, and WHERE on the page you want this clock to appear.. Post a link to you site so we can SEE what you see and not have to GUESS (and possibly provide you with incorrect and confusing information as a result..)

post your code between the CODE tags so that the forum software doesn't parse it..

[ CODE ] Your code goes here [ /CODE ]

(remove the spaces before the brackets)