How to add second add to cart button to single product page?

Hello Support,

I would like to add a second add to cart button which will be located side by side to the first add to cart button. It is also very important to have possibility to change the title of this button. Last thing I would like to determine a shipping method by choosing this new add to cart button.

I’ve tried everything. Spent all Christmas to find an answear. It can be changed in php.

Thank you for your help :slight_smile:

Hey @donmichau,

Regretfully, there’s no feature for this in X and this would also require WooCommerce custom development which is beyond the scope of our support. You’ll need to forward this to a third party developer.

Thank you for understanding.

Hey @christian_y

thank you for fast replay. I can modify my question to: I would like to add a second add to cart button which will be located side by side to the first add to cart button. It is also very important to have possibility to change the title of this button.

I have found some instructions at the forum how to add second button but it is located to much below old button: https://theme.co/apex/forums/topic/single-product-add-to-cart-button-placement/

I hope that it will be easier to help me :grinning:

Hi @donmichau,

Unfortunately, it still requires custom development since you’re modifying the default feature of a Woocommerce. That thread is just about moving the add to cart button and it still has single add to cart button.

I’m also not sure if that kind of setup is already done before, an add cart button connected to shipping. It would be a bit complex, I recommend contacting a Woocommerce developer. We are not fully familiar with Woocommerce internals.

Thanks!

HI @Rad ,

thank you for information. I’ve figured out how to double “add to cart button”:

add_action( ‘woocommerce_after_single_product_summary’, ‘custom_second_cart_button’, 10 );
function custom_second_cart_button(){
woocommerce_template_single_add_to_cart();
}

I need a help:

  1. How to locate a new button side by side next to “the first add to cart button”.

  2. How to delate/hide quantity from the second button.

Could you help me with that :smirk:

I’m sorry but custom development really is outside the scope of our support. That is essentially enhancing a custom feature. Please read our Terms.

If you see custom codes here in the forum, they’re only meant to be guides or samples. We don’t maintain or fix and enhance custom code. We also only provide samples if we can, it’s simple and if our products is connected to a particular function or area of a third party plugin. This case is not as you need to add a custom feature.

It’s best that you have a third party developer to work closely with you so he/she can attend to your customization needs.

Thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.