Ready to get started?Download WordPress


[resolved] [Plugin: WooCommerce] Add to cart hack (4 posts)

  1. kallekillen
    Posted 2 years ago #


    I'm looking to turn an image into an Add to Cart button. Basically I've got a page wich displays 3 images (representing 3 different products). What I'd like is that when you click on either of them, the corresponding product will be added to the cart and the user will be redirected to their cart (I assume this will redirect itself with the use of the "Redirect to cart after adding a product to the cart (on single product pages)" option enabled in the Woocommerce backend).

    Not sure where I found this snippet of code but I've tried adding a <a class="button add_to_cart_button product_type_%s"> to the image but no luck.

    Any help would be greatly appreciated!

  2. kallekillen
    Posted 2 years ago #

  3. navjyotiu
    Posted 2 years ago #

    Hello Kallekillen,

    I am also trying to do the same. I want user to click on product image and add product to cart and then redirect to the cart automatically for checkout.

    I am really confused, can you help?

  4. kallekillen
    Posted 2 years ago #

    See above link

Topic Closed

This topic has been closed to new replies.

About this Topic