Okay
  Public Ticket #706555
Days counted wrong on daily deals
Closed

Comments

  • Alex started the conversation

    Hi there, 

    I've set up a daily deal but the countdown isn't correct. Adding a range between today and  2016-04-08 the system shows in front office 1 day 13 hours, min...sec... And it should be more than 20 days

    How is it possible?

  •  1,615
    Criss replied

    We can't login to your FTP with old account so please open:"root/themes/hera/js/field-vela/jquery.field.js"

    Find:

    function initCountdown(el)
    {
        el.countdown(el.attr('data-time')).on('update.countdown', function(event){
            var format = '';
            if (event.offset.days > 1) {   
                format = format + '<div class="section_cout">%D ' + countdownDays + '</div>';
            } else{ 
                format = format + '<div class="section_cout">%d ' + countdownDay + '</div>';
            }
            if (event.offset.hours > 1) {   
                format = format + '<div class="section_cout">%H ' + countdownHours + '</div>';
            } else{ 
                format = format + '<div class="section_cout">%H ' + countdownHour + '</div>';
            }
            if (event.offset.minutes > 1) {   
                format = format + '<div class="section_cout">%M ' + countdownMinutes + '</div>';
            } else{ 
                format = format + '<div class="section_cout">%M ' + countdownMinute + '</div>';
            }
            if (event.offset.seconds > 1) {   
                format = format + '<div class="section_cout">%S ' + countdownSeconds + '</div>';
            } else{ 
                format = format + '<div class="section_cout">%S ' + countdownSecond + '</div>';
            }
            el.html(event.strftime(format)).fadeIn();
    
         });
    }
    

    Replace with the attached file




    Best Regards,
    Criss - FieldThemes