• Resolved eitacarlos

    (@eitacarlos)


    Hi! I’ve try everything to change my product page but cant see another option.
    So, lets understand my problem:
    i need add after button cart the countdown, but i dont know how!

    Can anyone else help me?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • 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.

    Thread Starter eitacarlos

    (@eitacarlos)

    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.
    Thread Starter eitacarlos

    (@eitacarlos)

    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, 1 month ago by eitacarlos.
    mivtt

    (@mivtt)

    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.

    Thread Starter eitacarlos

    (@eitacarlos)

    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?

    mivtt

    (@mivtt)

    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.
    Thread Starter eitacarlos

    (@eitacarlos)

    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?

    mivtt

    (@mivtt)

    Hi,

    Do you want the counter will be hidden in the mobile mode? If yes, unfortunately, this option is unavailable now.

    Best regards.

    Thread Starter eitacarlos

    (@eitacarlos)

    no. i just want he stay fixed on page like on desktop

    Plugin Author mytrinh

    (@mytrinh)

    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

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘try to add countdown after single product summary’ is closed to new replies.