8

I have spent the majority of the day trying to figure out how to adjust the single product page using woocommerce.

I would like to add a custom button next to the "Add to cart" button that would be a custom link that says "Next". I am working on an invitation website where there are numerous components to an invitation, so after a user adds a product to their cart, I want there to be an option that says "Next" so they can go ahead and customize the next piece of the invitation. (I will have custom fields for each). The next button won't be on all products, and the link will be different for each. I don't think this is the best way to do it, but don't have another solution right now.

I also was researching bundles products or "composite products" - however, composite products are all on one page and I will need to add variations for each for quantities of 25/50/75/100 etc...

See link below: http://blisspaperboutique.com/product/retro-romance-wedding-invitation-template/

How can I add an additional button on the product page?

Here is a site that is doing something similar to what I am trying to do: http://www.weddingpaperdivas.com/product/16445/signature_white_wedding_invitations_enchanting_forever.html#color/04

starball
  • 20,030
  • 7
  • 43
  • 238
user3715275
  • 95
  • 1
  • 1
  • 7

1 Answers1

23

Add below code in your theme's function.php file.

add_action( 'woocommerce_single_product_summary', 'my_extra_button_on_product_page', 30 );

function my_extra_button_on_product_page() {
  global $product;
  echo '<a href="URL">Extra Button</a>';
}

Cheers!!!

Prashant Kanse
  • 772
  • 11
  • 23
  • I tried it, its not working. not creating any button – Raj Jul 15 '19 at 16:03
  • It kind of works to me. Try refreshing page without cache. Also I'm using a plugin "Code snipets" to make the change instead of directly editing functions.php. I also included an URL inside of that code. Best luck! – V-cash Mar 23 '22 at 18:16