Home › Forums › Basel support forum › Count Down Timer
Count Down Timer
- This topic has 12 replies, 3 voices, and was last updated 6 years, 5 months ago by Elise Noromit.
-
AuthorPosts
-
June 21, 2018 at 7:45 am #64017
techtronicsParticipantDear 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.June 21, 2018 at 9:44 am #64050
Elise NoromitMemberHello,
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
June 21, 2018 at 10:20 am #64059
techtronicsParticipantHi 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
June 21, 2018 at 11:26 am #64073
Elise NoromitMemberHello,
Please provide your FTP access.
Best Regards
June 21, 2018 at 11:34 am #64076
techtronicsParticipantDetails given
June 21, 2018 at 12:09 pm #64077
Artem TemosKeymasterPlease, check how it works now.
June 21, 2018 at 12:43 pm #64088
techtronicsParticipantHello 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 endJune 21, 2018 at 12:53 pm #64089
techtronicsParticipantPlease see the attached image for reference!
Attachments:
You must be logged in to view attached files.June 21, 2018 at 2:49 pm #64116
Elise NoromitMemberHello,
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
June 22, 2018 at 6:13 am #64203
techtronicsParticipantI 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.June 22, 2018 at 8:01 am #64240
Elise NoromitMemberHello,
Please provide your site admin access.
Best Regards
June 22, 2018 at 9:30 am #64260
techtronicsParticipantCredential are mentioned below:
June 22, 2018 at 12:20 pm #64309
Elise NoromitMemberHello,
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
-
AuthorPosts
- You must be logged in to create new topics. Login / Register