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

    Hi I would like to add the “add to cart”-button to a product grid:

    I’m using the Enfold Shop demo with woocommerce.

    thsnks!!

    #1277550

    Hey PGerousse13,

    Thank you for the inquiry.

    We could use this snippet in the functions.php file to render the add to cart button after the product title in the shop page.

    add_action( 'after_setup_theme', function() {
         add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 12 );
    }, 999);

    It might require a few style adjustments. Site looks very nice by the way.

    Best regards,
    Ismael

    #1278750

    Hi Ismael, thanks for the compliment!!
    But I would like to add the “add-to cart button” on the home-page where I have all my products displayed. The customer should be able to add products immediatly on the home-page.

    thanks!!

    #1279028

    Hi,

    Yes, the snippet above should include an add to cart button after every product title in the shop loop. Did you try it? Please post the login details in the private field so that we could test the modification.

    Best regards,
    Ismael

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