Reputation: 393
I want to create a new buy now sort of button besides the real buy now button on a woocommerce product. The function for this will be to be able to trade a product with another product, so when clicking this new buy now, it will open a custom popup, with image fields and the ability to add extra cash on top of the product - the seller will then be able to accept or deny the offer - how do i go about it? We use Woocommerce, Buddypress, And WooCommerce vendors - how can we do this?
After accepting it will go to checkout for buyer. Thanks.
Upvotes: 1
Views: 2793
Reputation: 3614
This code will create extra button on single product page beside add to cart button.
add_action('woocommerce_after_add_to_cart_button','additional_button');
function additional_button(){
echo '<input type="button" name="trade_product" value="Trade Product />"';
}
Upvotes: 1