Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #119621

    Raphael B
    Participant

    Hello,
    I Need to add a button to the right of the “add to cart” button in the single product page.
    http://www.potopoto.be/secondome/?product=white-shadow-collection
    Is there any other way than editing the single product template?
    Which file should I edit?

    thanks in advance.

    raf

    #119681

    Kosher K
    Member

    Hi Raf,

    Thanks for writing in,

    You can take advantage of woocommerce hooks,

    You need to set-up a child theme first, Just download one of the child theme and install/activate,

    Then add this code below in your Child theme functions.php

    add_action('woocommerce_after_add_to_cart_button','cmk_additional_button');
    function cmk_additional_button() {
    	echo '<button type="submit" class="button alt">Change me please</button>';
    }

    Have a great day

    #120395

    Raphael B
    Participant

    Sadly it does not seems to work.
    Here’s a link with no button:

    http://www.potopoto.be/secondome/shop/5-5-designers/bucolic-collection/

    #120396

    Raphael B
    Participant

    Is it possible with the same idea of hooks to add another button on the cart page?

    #120397

    Raphael B
    Participant

    I am sorry it did worked !
    But In the page where I don’t use a third party plugin to diplay a list of variations.
    I just need to understand how the hooks work to put the same button with a variable product.

    Can you Help about this?
    I need to add the same button on this page:
    http://www.potopoto.be/secondome/shop/5-5-designers/bucolic-collection/

    #120533

    Kosher K
    Member

    Hi There,

    Please refer to woocommerce hook documentation, -> http://docs.woothemes.com/document/hooks/

    These are default woocommerce feature and we have limited support with it.

    Thanks for understanding, Have a great day

    #120545

    Raphael B
    Participant

    Ok thanks!

    #120789

    Kosher K
    Member

    No Problem,

    Have a great day

    #168750

    jeromekang
    Participant

    Hi I was able to add the code in my function.php. The wishlist button shows up but it is below the ‘add to cart’ button. How would it be placed right beside the ‘add to cart’ button? Using Renew Stack. The wishlist button i’m adding is a shortcode which I think starts with a div tag. site is http://www.uddo.ph

    #168891

    Christopher
    Moderator

    Hi there,

    Upon checking your site ,i can’t see ‘add to wishlist’ button inside product page.
    Please add the code so i can provide you with tailored solution.

    Thank you.