-
AuthorPosts
-
October 6, 2014 at 1:49 pm #119621
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
October 6, 2014 at 3:34 pm #119681Hi 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
October 7, 2014 at 3:24 am #120395Sadly it does not seems to work.
Here’s a link with no button:http://www.potopoto.be/secondome/shop/5-5-designers/bucolic-collection/
October 7, 2014 at 3:26 am #120396Is it possible with the same idea of hooks to add another button on the cart page?
October 7, 2014 at 3:31 am #120397I 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/October 7, 2014 at 7:37 am #120533Hi 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
October 7, 2014 at 7:50 am #120545Ok thanks!
October 7, 2014 at 2:32 pm #120789No Problem,
Have a great day
December 22, 2014 at 3:45 am #168750Hi 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
December 22, 2014 at 8:04 am #168891Hi 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.
-
AuthorPosts