Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #291994

    Hello,

    For now it seems that it’s only possible to count up the animated numbers from 0 to the set customized number, but is it also possible to let the animated number countdown, from fror example 10.000 to 8943? So is starts at 10.000 instead of 0. It’s from economic view smarter when people see the prices in that way.

    See the private link for the relevant page.

    Thanks in advance,
    Tim

    • This topic was modified 10 years, 4 months ago by broodjekaas.
    #292186

    Hi broodjekaas!

    Currently it is not possible. But feel free to request such feature or vote if already requested here – https://kriesi.at/support/enfold-feature-requests/

    Best regards,
    Yigit

    #343088

    I love the animated countdown. (and new Enfold updates. It keeps on getting better and better!)

    Can a script be added that it restarts every wednesday. We have courses that begin on Wednesday – I’d like to use the countdown to the next time the course begins.

    Thank you!

    #344099

    Hey!

    It is possible but unfortunately you are going to need to hire a freelance developer on Envato Studio or Codeable for that kind of customization as it is beyond the scope of support we can provide. You can also request quote from WerkPress.
    Please feel free to request such feature as well – https://kriesi.at/support/enfold-feature-requests/

    Regards,
    Yigit

    #416368
    This reply has been marked as private.
    #416380

    Hi!

    Yes, there is Animated Countdown element – http://i.imgur.com/3n5BUPH.png
    Please make sure that you are using the latest version of Enfold 3.1.1 – http://kriesi.at/documentation/enfold/updating-your-theme-files/

    Best regards,
    Yigit

    #416417

    Yigit,

    I can only use that one for dates. I wanna show a counter which counts down from 1250 Euro to 750 Euro.
    That option is not available is it? If not can I add it somewhere?

    Envis

    #417187

    Hey!

    I found this, http://codepen.io/shivasurya/pen/FatiB, which may help you out in creating your own.

    Best regards,
    Elliott

    #545932

    @envis, were you able to solve this? I’m looking for the same exact thing and would be interested to know from you if you made it and how.

    Thanks.

    Antonio

    #545954

    I had to hire someone, but here is the script. You may be able to work with it. This one restarts every Wednesday.

    <!– RESET COUNTDOWN TIMER TO NEXT WEDNESDAY –>
    <style>.av-countdown-timer{opacity: 0!important;}</style>
    <script>

    var cday;
    var timeInSecs;
    var ticker;

    function getSeconds() {
    var now = new Date();
    var dy = 3;
    var countdowntime = new Date(now.getFullYear(),now.getMonth(),now.getDate(),0,0,0);

    var nowtime= now.getTime();
    var atime = countdowntime.getTime();
    var diff = parseInt((atime – nowtime)/1000);
    if (diff > 0) {
    cday = dy – now.getDay()
    } else {
    cday = dy – now.getDay() -1
    }
    if (cday < 0) {
    cday += 7;
    }
    if (diff <= 0) {
    diff += (86400 * 7)
    }
    startTimer (diff);
    }

    function startTimer(secs) {
    timeInSecs = parseInt(secs);
    ticker = setInterval(“tick()”,1000);
    tick();
    }

    function tick() {
    var secs = timeInSecs;
    if (secs>0) {
    timeInSecs–;
    } else {
    clearInterval(ticker);
    getSeconds();
    }

    var days = Math.floor(secs/86400);
    secs %= 86400;

    var hours= Math.floor(secs/3600);
    secs %= 3600;

    var mins = Math.floor(secs/60);
    secs %= 60;

    var p_day = “”
    var p_hr = “”
    var p_min = “”
    var p_sec = “”

    if (cday != 1) { p_day = “s” }
    if (hours != 1) { p_hr = “s” }
    if (mins != 1) { p_min = “s” }
    if (secs != 1) { p_sec = “s” }

    //var result = cday + ‘ day’ + p_day + ‘ ‘;
    //result += hours + ‘ hour’ + p_hr + ‘ ‘ + mins + ‘ minute’ + p_min + ‘ ‘ + secs + ‘ second’ + p_sec;
    // document.getElementById(“countdown”).innerHTML = result;
    jQuery(‘.av-countdown-days .av-countdown-time’).html(cday);
    jQuery(‘.av-countdown-hours .av-countdown-time’).html(hours);
    jQuery(‘.av-countdown-minutes .av-countdown-time’).html(mins);
    jQuery(‘.av-countdown-seconds .av-countdown-time’).html(secs);
    jQuery(‘.av-countdown-timer’).css(‘opacity’, ‘1!important’);
    jQuery(‘.av-countdown-timer’).attr(‘style’,’opacity:1!important’);

    }

    // LOAD DIFFERENT IMAGES AS BACKGROUND FOR COUNTER
    jQuery(document).ready(function() {
    jQuery(‘.av-countdown-days .av-countdown-time’).html(”);

    getSeconds();
    //jQuery(‘.av-countdown-timer’).css(‘display’, ‘block’);
    });
    </script>

    #545957

    Hi @Wildwood, thank you for sharing the code with everyone for that time related countdown timer.

    I actually addressed @envis to see if he was able to solve what he said in the message above (quote: “I wanna show a counter which counts down from 1250 Euro to 750 Euro.”), which is what I was looking for.

    I’ll try see if I can somehow contact him privately – not sure this is possible here (and it wouldn’t actually be the reason to have a support forum like this awesome one;))

    Antonio

    #547027

    Hi!

    you guys could email each others. Simply click on “Send E-Mail” below profile picture.

    Cheers!
    Andy

    #769787

    Thanks mate!

    In which file do you put the code?

    And does anyone know how to rewrite it, so it automatically refreshes every time the counter hits 00?

    Thanks!

    #772213

    Hi,


    @lauritschristensen
    : The script should go inside an external js file or use the wp_footer hook.

    Best regards,
    Ismael

    #772349

    Thanks Ismael,

    However, I am no coding genius, so if you could explain a bit further that’d be highly appreciated!

    I.e.
    1. Create “animated-countdown-looper.js”
    2. Place in “/correct-folder
    3. Do this voodoo magic

    Haha, sorry for being a noob man.

    Cheers,

    #773643

    Hey!

    Instead of the external file, try this hook in the functions.php file.

    // https://pastebin.com/9PqwShF0

    Please contact the script author for more info.

    Regards,
    Ismael

    #773728

    Thanks Ismael!

    Now, where do I add the code?

    I tried to read about hooks on Google, but seemed very confusing.

    Something like:
    1. Create .module file (i.e. countdown_reset.module)
    2. Create .info file (i.e. countdown_reset.info)
    3. Place in /modules folder (exactly where in the directory? i.e. /wp-content/themes/enfold/includes/modules)

    I am just very uncertain what files to create, where to place them and how they will connect to the Animated Countdown

    I highly appreciate all your help!

    #774813

    Hi!

    The code should go in the functions.php file. I didn’t test it personally though. Please contact the plugin or script author for more info.

    Best regards,
    Ismael

    #775426

    Thanks Ismael.

    Unfortunately, it didn’t do the trick.

    To give you more insight:
    The countdown is for a product offer.

    I’d ultimately like to simply be able to set the timer at i.e. 1 hour, 23 min., 12 sec., and always have it begin there when the page is reloaded.

    #775775

    Hi!

    If you want to reset the countdown to 1 hour, 23 min, 12 seconds every time the page reload, you can try this in the functions.php file:

    function ava_custom_script_fix(){
    ?>
    <script>
    (function($){
    	function a() {
    			$('.av-countdown-timer').each(function() {
    							var d = new Date();
    							$(this).data('day', d.getDate());
    							$(this).data('hour', d.getHours() + 1);
    							$(this).data('minute', d.getMinutes() + 23);
    							$(this).data('second', d.getSeconds() + 12);
    			});
    	}
    
    	a();
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_custom_script_fix');

    Don’t forget to remove the first modification.

    Cheers!
    Ismael

    #775972

    You, Ismael, have deserve a nice big cold beer!

    It worked!

    Thank you so much mate!

    HOWEVER!

    Add the code to the “enfold-functions.php” and not “functions.php”.

    #777176

    Hey!

    Glad we could help. Please note that this will affect every timer in the site so you have to turn on the custom css class field if you want to use it for a specific timer.

    // http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    Cheers!
    Ismael

Viewing 22 posts - 1 through 22 (of 22 total)
  • You must be logged in to reply to this topic.