This topic has 26 replies, 2 voices, and was last updated 2 years, 1 months ago ago by Jemo
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
See private part, thanks
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
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
On the public function for public side i have this code, is this that you mean about “hook” ?
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
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
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
ok i remove file that i have copied from framework folder to the child theme.
thanks
ACCESS ON THE PRIVATE CONTENT >>>>>>
in case you need to see the entire file from the dev of the plugin (file he mentionned in his answer) (look at private)
Hello,
Could you, please, send us pem file instead of ppk? And also tell us FTP username that we should use.
Regards
For win time >>>
PEM >>>
regards
Hello,
Thank you. Access works. I passed your request to our developers. I’ll inform you once they fix the problem.
Regards
thanks a lot
regards
i am dispo via email if needing
thanks
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
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)
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
Hi >>>
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
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