Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1039374

    Hi, how can I add a new button to the product page that will go back to the shop page?

    #1039456

    Hey DROR,

    Please look into the following:

    WooCommerce Continue Shopping

    Best regards,
    Jordan Shannon

    #1039565

    Thats not what I need. I want to add a new button to the product page that goes back to the shop along site the “add to cart” button that is already existing in every product page.

    #1039770

    Hi,

    Please try adding this at the very end of your themes/child theme’s functions.php file:

    You can change the button class name and button url in the below code.

    
    
    // Button after add to cart
    
    // Button after add to cart
    function button_after_add_to_cart(){
    ?>
    <script>
    jQuery(window).load(function(){ 
    	jQuery(function($) {
      	jQuery('.single_add_to_cart_button.button').after('<a class="avia-button   avia-icon_select-yes-left-icon avia-color-blue avia-size-large avia-position-left "  style="margin-right: 10px;margin-left: 10px;"   href="http://www.your-site.com/store/">Back to store</a>');
    	});
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'button_after_add_to_cart');
    
    
    // End function
    

    For more information about adding custom script please check this link.

    Best regards,
    Vinay

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.