Hi,
Please try to test with WooCommerce and Sales Countdown Timer plugin only.
Do you use a plugin that makes custom the add to cart button?
Best regards.
No, i don’t have any plugin to edit position button on woocommerce! I just edited functions.php line to button show up next footer page.
Hi,
Please replace by this code to the add to cart function instead of your custom functions
global $product;
if($product){
do_action( 'woocommerce_' . $product->get_type() . '_add_to_cart' );
}
Best regards.
-
This reply was modified 6 years, 1 month ago by
mivtt.
Hi, so…
help with this!
to add cart button on final page i add this code:7
/** excerpt position change **/
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_add_to_cart' );
function woocommerce_template_single_add_to_cart () {
echo '<form class="cart" action="https://upnid.com/go/p24070?p=7v1ke" method="get">
<button type="submit" class="single_add_to_cart_button button alt">Comprar</button>
<input type="hidden" name="p" value="7v1ke" />
</form>';
}
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
the ‘woocommerce_after_single_product_summary’ is a location where button is.
and the ‘woocommerce_template_single_add_to_cart’ is the function that the button will do.
So, how i add the code for the countdown show after the button?
-
This reply was modified 6 years ago by
eitacarlos.
Hi,
Please replace these functions:
function woocommerce_template_single_add_to_cart () {
echo '<form class="cart" action="https://upnid.com/go/p24070?p=7v1ke" method="get">
<button type="submit" class="single_add_to_cart_button button alt">Comprar</button>
<input type="hidden" name="p" value="7v1ke" />
</form>';
}
Into these:
function woocommerce_template_single_add_to_cart () {
global $product;
if($product){
do_action( 'woocommerce_' . $product->get_type() . '_add_to_cart' );
}
}
Best regards.
ok, but now i need show up the counter time after the button! what command do i need to add right after these lines of code?
Hi,
Please go to the plugin settings, in the single product position, select after cart option, as this image https://prnt.sc/rgx4jb
Best regards.
-
This reply was modified 6 years ago by
mivtt.
hello, so i need the counter not to be floating in the mobile version but rather to be fixed the same in the pc version.
how to do this?
Hi,
Do you want the counter will be hidden in the mobile mode? If yes, unfortunately, this option is unavailable now.
Best regards.
no. i just want he stay fixed on page like on desktop
Hello @eitacarlos,
Maybe we misunderstand what you mean, can you please describe clearly what you need to show on the site by some screenshots?
Regards