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!
- The topic ‘[Plugin: WooCommerce] Add to cart hack’ is closed to new replies.