If this is your first visit, check our documentation. To post, register or login.
Forums / Addon Templates / Countdown Sidebox Help please

Countdown Sidebox Help please

Started by integrity_designs on 3 Oct 2011, 7:48 AM · Views: 1,091

Results 1 to 6 of 6
3 Oct 2011, 7:48 AM
#1
integrity_designs avatar

integrity_designs

Zen Follower

Join Date:
Nov 2009
Location:
North Bendigo, VIC, Australia
Posts:
157
Plugin Contributions:
0

Countdown Sidebox Help please

I have the Editable Sidebox installed.
I installed the Countdown Sidebox with Image but for some reason I can not get the "83 days to Christmas" etc.... (I assume there is supposed to be text showing the countdown).

It replaces the file from Editable Sidebox located here:
includes/languages/english/html_includes/YOUR_TEMPLATE_NAME/define_editable_sidebox_content.php

I have the new image etc and I have adjusted the date.
Can someone please help me as to why this in not working?
Thank-you in advance
Casey
website

3 Oct 2011, 3:39 PM
#2
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Countdown Sidebox Help please

Perhaps you should use the support thread for this mod or contact the author.

3 Oct 2011, 6:15 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Countdown Sidebox Help please

I just installed this on a test site and it works for me. You might post the contents of that file ( define_editable_sidebox_content.php) here - we might spot something.

4 Oct 2011, 10:59 PM
#4
integrity_designs avatar

integrity_designs

Zen Follower

Join Date:
Nov 2009
Location:
North Bendigo, VIC, Australia
Posts:
157
Plugin Contributions:
0

Re: Countdown Sidebox Help please

stevesh:

I just installed this on a test site and it works for me. You might post the contents of that file ( define_editable_sidebox_content.php) here - we might spot something.

<html> <head> <title>No title</title> <meta name="generator" content="Namo WebEditor v5.0"> </head> <body><center> <!Change gif name on next line to match holiday --> <img src="images/K6.png" width="177" height="258" border="0" alt=""></center><br> <!-- EDIT BELOW THIS LINE --> <script type="text/javascript"> /* Count down until any date script- By JavaScript Kit (<https://www.javascriptkit.com>) Over 200+ free scripts here! */

/change the text below to reflect holiday,/
var before="Christmas!"
var current="Today is Christmas!"
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countdown(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(246060*1000))*1)
if (difference==0)
document.write(current)
else if (difference>0)
document.write("Only "+difference+" days until "+before)
}
//enter the count down date on next line using the format year/month/day
countdown(2011,12,25)
</script>

</body> </html>

I got it working but now I need it to show as Australian Date (DD/MM/YYYY)
I can't seem to get it to happen.
Can you please help?

Thanks in advance
Casey

9 Oct 2011, 11:13 AM
#5
integrity_designs avatar

integrity_designs

Zen Follower

Join Date:
Nov 2009
Location:
North Bendigo, VIC, Australia
Posts:
157
Plugin Contributions:
0

Re: Countdown Sidebox Help please

Any suggestions please on the correct way to change this to Australian Date?
Thanks in advance
Casey

9 Oct 2011, 1:40 PM
#6
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Countdown Sidebox Help please

integrity_designs:

Any suggestions please on the correct way to change this to Australian Date?
Thanks in advance
Casey
I see your whole site uses the default us date format, instructions to change are here
https://www.zen-cart.com/tutorials/index.php?article=401

What ever your doing remember to KISS ( Keep It Simple Stupid )