Problem with displaying countdown on single product page

This topic has 26 replies, 2 voices, and was last updated 2 years, 1 months ago ago by Jemo

  • Avatar: Jemo
    Jemo
    Participant
    March 14, 2022 at 17:53

    Hi there,

    i use for all my product the plugin “lottery and prizes for woocommerce”
    (https://codecanyon.net/item/woocommerce-lottery-wordpress-prizes-and-lotteries/15075983)

    normally this should display a countdfown on each single product (because all my product are lotteries).

    when i attempt to test with a standart theme from wordpress, the countdown is displaying.

    I use the “single product builder” and i think it is the problem perhaps? it is as the builder forgot the countdown from the plugin…

    i dont know what i can do… can you help about this mistake?

    Thanks in advance

    Please, contact administrator
    for this information.
    25 Answers
    Avatar: Jemo
    Jemo
    Participant
    March 14, 2022 at 19:03

    See private part, thanks

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 14, 2022 at 19:04

    Hello,

    Probably that plugin uses some WooCommerce hook that is missing when you use single product builder. So, could you, please, contact plugin developers and clarify what hook do they use on the single product to display countdown?

    Also, provide us with FTP access to your site to help you with this issue.

    Regards

    Avatar: Jemo
    Jemo
    Participant
    March 15, 2022 at 12:30

    Hi

    i ask the question bout hook at the developer of the plugin.

    for FTP access, you must use plugin FTP Manager or similar because i use Google Cloud SSH Access.

    Thanks

    Avatar: Jemo
    Jemo
    Participant
    March 15, 2022 at 15:23

    On the public function for public side i have this code, is this that you mean about “hook” ?

    Avatar: Jemo
    Jemo
    Participant
    March 16, 2022 at 10:11

    Hi

    the team dev for the plugin answer to me:

    we are loading countdown template with this:

    add_action( ‘woocommerce_lottery_before_participate’, ‘woocommerce_lottery_countdown_template’ );

    in includes\class-wc-lottery.php line 296

    Avatar: Jemo
    Jemo
    Participant
    March 16, 2022 at 12:19

    I have copied from Xstore parent theme the directory and its elements:

    wp-content/themes/xstore-child/framework/customizer/theme-options/woocommerce/single-product

    I imagine that i must add the hook about the countdown on the file ‘global.php or layout.php”?

    i have copied this folder for keep modification if never an update erase the modification: is it that i must do? i don’t know if this “HOOK” can be the alone line in one of the “customizer/theme-options/woocommerce/single-product/layout.php or global.php” (in this idea that the alone line put on one of this file should be adding the hook on the “normal file in use” ??

    i hope i explain good…?

    awaiting reply from you

    thanks in advance

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 16, 2022 at 14:50

    Hello,

    1) Don’t copy any files from the framework folder to the child theme. They won’t work and may cause an issue. If you want to change some functions from files from the framework folder you need to copy only function code to child theme funxtions.php and edit that according to your needs.

    2) We need FTP or SFTP access to your WP installation files. We can’t use File manager plugin because if any fatal error appears during dev process we’ll be locked. So, contact your hosting support and ask how could we connect to your server via FTP/SFTP to help you. Or disable single product builder and use the default layout, then countdown will work.

    Regards

    Avatar: Jemo
    Jemo
    Participant
    March 16, 2022 at 15:26

    ok i remove file that i have copied from framework folder to the child theme.

    thanks

    ACCESS ON THE PRIVATE CONTENT >>>>>>

    Please contact administrator
    for this information.
    Avatar: Jemo
    Jemo
    Participant
    March 16, 2022 at 15:27

    in case you need to see the entire file from the dev of the plugin (file he mentionned in his answer) (look at private)

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 16, 2022 at 17:34

    Hello,

    Could you, please, send us pem file instead of ppk? And also tell us FTP username that we should use.

    Regards

    Avatar: Jemo
    Jemo
    Participant
    March 16, 2022 at 18:03

    For win time >>>

    Please contact administrator
    for this information.
    Avatar: Jemo
    Jemo
    Participant
    March 16, 2022 at 18:43

    PEM >>>

    regards

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 17, 2022 at 11:40

    Hello,

    Thank you. Access works. I passed your request to our developers. I’ll inform you once they fix the problem.

    Regards

    Avatar: Jemo
    Jemo
    Participant
    March 17, 2022 at 12:33

    thanks a lot

    regards

    i am dispo via email if needing

    thanks

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 17, 2022 at 14:14

    Hello,

    We have added compatibility with the plugin in your child theme functions.php

    // Make woocommerce lottery compatible with XStore Single Product Builder
    add_action('init', function() {
    	if (function_exists('woocommerce_lottery_participate_template')) {
    		add_action( 'etheme_woocommerce_template_single_add_to_cart', 'woocommerce_lottery_participate_template', 25 );
    	}
    	if (function_exists('woocommerce_lottery_winners_template')) {
    		add_action( 'etheme_woocommerce_template_single_add_to_cart', 'woocommerce_lottery_winners_template', 25 );
    	}
    });

    Also, I changed the style of the q-ty to pink. Check if this is ok.

    Regards

    Avatar: Jemo
    Jemo
    Participant
    March 17, 2022 at 19:41

    Hi

    Thanks, it’s display.

    How can i put it (the countdown) just after the short description of the product (and not at the end) ?

    And also, how can i fix the “quantity input” at the center with the text “choose quantity” just before (and center too) ? (thanks for the color, it is what i needing)

    You have help me a lot, really, merry thanks!!!!
    (excuse bad english i am french)

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 18, 2022 at 00:37

    Hello,

    Could you, please, provide us with the screenshot of where exactly you want to place the countdown and how the q-ty should look to avoid misunderstanding?

    Regards

    Avatar: Jemo
    Jemo
    Participant
    March 18, 2022 at 08:45

    Hi >>>

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 18, 2022 at 10:37

    Hello,

    I changed the counter hook and added custom code to display additional info https://gyazo.com/f21220276111f82593b380ab2a14ae2c
    Check it and edit according to your needs.

    Regards

  • 1 2
    Viewing 20 results - 1 through 20 (of 26 total)

The issue related to '‘Problem with displaying countdown on single product page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.