Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1193056
    Rich R
    Participant

    Hello!

    I added a button next to “add to cart” on our Companies Website to offer special pricing.

    Now I’m stuck trying to make the button link to our contact page or set it up to make a direct phone call.

    What is the best thing you recommend I do?

    add_action(‘woocommerce_after_add_to_cart_button’,’cmk_additional_button’);
    function cmk_additional_button() {
    echo ‘<button type=”submit” class=”button alt”>Promo Pricing Available – CALL NOW!</button>’;
    }

    #1193453
    Lely
    Moderator

    Hi Rick,

    We can use the following code instead:

    add_action('woocommerce_after_add_to_cart_button','cmk_additional_button');
    function cmk_additional_button() {
    echo  '<a href="tel:555-555-5555" class="button alt">Promo Pricing Available – CALL NOW!</a>';
    }

    Update the phone number.

    Hope this helps.

    #1196522
    Rich R
    Participant

    Wonderful. Thank you so much!

    #1196829
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1193056 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>