This topic has 26 replies, 2 voices, and was last updated 2 years, 9 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
Hi, thanks for reply.
Yes it is this. i have update code for be as required (1 line for the text) and add br for correct space.
How can i put the “add to cart button” on the align : right ? because on the single product builder it is set on “right” but not on display?
the text on the “add to cart button” is setting on the buider, on the language file of the theme or on the plugin in use for lottery? do you know that? (for add space between the text and the price)
because in the state the text “Enter NOW for” is stuck to the price “10CBJ”,
also is it possible to have the prize only in another color (leaving the color as it is for the “Enter NOW for” (example: blue)?
thanks
Hello,
It’s not possible to put the button next to q-ty input with the existing HTML structure. It displays in the column because you chose column direction https://www.awesomescreenshot.com/image/24305157?key=4bee7926dfd4303afb99f92088a8ad9a You may choose the row but then information that you added won’t be displayed correctly.
I suppose the text comes from the plugin. It’s not the theme or plugin default text.
Add the below code to child theme style.css to change the color of the button texts
.single-product .product .single_add_to_cart_button.button {
color: blue;
}
.single-product .product .single_add_to_cart_button span.atct-price {
color: #fff;
}
Regards
Regards
Hi thanks
i think i make an error because i have lost the changed style of the q-ty to pink and the element (that you have put in function.php) is re-display on the left and not on center…
sorry… i think i should download file before change… sorry.. Could you reput the q-ty to pink and reput on center the ensemble? (text + qty) ?
sorry
what is the object of this on the functions.php file:
//add_action(‘after_setup_theme’, ‘etheme_wc_image_slider_support’, 2);
//function etheme_wc_image_slider_support () {
//add_theme_support( ‘wc-product-gallery-slider’ );
// }
? it is for what? i don’t know if i must keep active or not (afraid for the slider on single product page)
Another question:
on the header i have a “static block” that include the form “have you a coupon?” from woocommerce.
When i attempt to put a test coder, how can i have the response just under (because when i test, the answer (ex: coupon is not valide” is displaying in “my account” page”… have you a solution about this?
And last question (promise):
the flech direction for the slider on the gallery picture on single product page: how can i change color and visibility for the direction (not visible) and how can i put them not on the middle as a “normal slider” ? can i use “dot” instead of arrow?
or better: keep the way and put the same css as quantity input for the arrow direction for the slider (circle with pink border, background white and arrow in blue for exemple)
sorry for messing up, i am aware of your amazing help and i am super happy about it…sorry for my mistake…really
pardon
i have reput the quantity color 😉
I have put the arrow in circle 😉
Do you know how i can tell to display first at open single product the second tab “INFORMATIONS COMPEMENTAIRES” ?
is it a code to add or in setting of the theme?
thanks in advance
hops: i have found
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