Home Forums Basel support forum Count Down Timer

Count Down Timer

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #64017

    techtronics
    Participant

    Dear Team,

    I wanted to display count down timer for sales item as well as particular category/section.
    I am trying to integrate with section but it shows 0 days (shown in image1) as well as single product page for sales product.

    Also can we customize it’s look as shown in reference image two attached.

    I have done below settings in my website:
    Enable the timer on your shop page in Theme Settings -> Shop -> Countdown timer and for the product page in Theme Settings -> Product page -> Show / hide elements -> Countdown timer.

    Attachments:
    You must be logged in to view attached files.
    #64050

    Hello,

    Please add this code to basel-child/functions.php

    function basel_product_sale_countdown() {
    	global $post;
    	$sale_date_end = get_post_meta( $post->ID, '_sale_price_dates_to', true );
    	$sale_date_start = get_post_meta( $post->ID, '_sale_price_dates_from', true );
    	$curent_date = strtotime( date( 'Y-m-d H:i:s' ) );
    
    	if( $sale_date_end < $curent_date || $curent_date < $sale_date_start ) return;
    
    	$timezone = 'GMT';
    
    	if ( apply_filters( 'basel_wp_timezone_shop', false ) ) $timezone = wc_timezone_string();
    
    	echo '<div class="basel-product-countdown basel-timer" data-end-date="' . esc_attr( date( 'Y-m-d H:i:s', $sale_date_end ) ) . '" data-timezone="' . $timezone . '"></div>';
    }

    This issue will be fixed in our nearest update.

    Best Regards

    #64059

    techtronics
    Participant

    Hi Elise Noromit,

    I am trying to update given code in function.php/ child-theme function.php in both scenario my website getting down showing HTTP ERROR 500

    Please check the code once or let me know if some changes required from my side

    #64073

    Hello,

    Please provide your FTP access.

    Best Regards

    #64076

    techtronics
    Participant

    Details given

    #64077

    Artem Temos
    Keymaster

    Please, check how it works now.

    #64088

    techtronics
    Participant

    Hello Thanks for your prompt response!

    It’s working now but noticed some another problem now:

    I have set the count down timer to 2018/06/22 for sales product and for a section with countdown theme element, but as shown in image it counting different times for both.

    2- Can we make it more responsive/customize as it’s appearing in two lines in reference URL: https://www.gugglu.com/

    3- In such case if a deal is going for 4 hours then how to hide day column on front end
    Only HH MM SS should be displayed at front end

    #64089

    techtronics
    Participant

    Please see the attached image for reference!

    Attachments:
    You must be logged in to view attached files.
    #64116

    Hello,

    1. Please check and make sure you have set the same time in both.

    2. You can make fewer grid items in the row, they will be bigger and the countdown timer will be in one line. Make four items in a grid.

    3. No, there is no such option. You set date in this format 2017/12/12

    Best Regards

    #64203

    techtronics
    Participant

    I have double check the same time configured on both place but on front end it’s showing different time check the attached images:

    Attachments:
    You must be logged in to view attached files.
    #64240

    Hello,

    Please provide your site admin access.

    Best Regards

    #64260

    techtronics
    Participant

    Credential are mentioned below:

    #64309

    Hello,

    The difference is caused by the different time setting in countdown time of the element and WooCommerce http://prntscr.com/jy0sqb

    As you can see WooCoomerce specifies the hours. Our theme does not influence WooComerce.

    Try to set the time in countdown element https://prnt.sc/jy12re

    Best Regards

Viewing 13 posts - 1 through 13 (of 13 total)