RoofTurkey
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Multiple add to cart buttons for different quantitiesIt got the correct post id yes.
However now I get a 404 error when trying to add something to the cart, so I’m going to try and fix that first.Forum: Plugins
In reply to: [WooCommerce] Multiple add to cart buttons for different quantitiesFor some reason, even when I manually type in the correct URL, it doesn’t put the product in my cart.
Any idea what might be causing that?Edit: I have managed to generate the correct URL using:
<?php $postid = get_the_ID(); $url = get_bloginfo('url') ."/shop/cart/?add-to-cart=". $postid. "&quantity=50000"; ?> <a href=<?php echo "$url";?> class="single_add_to_cart_button button alt">Add 50000 items for €100</a>However it just leads me to the shopping cart saying it’s still empty.
Forum: Plugins
In reply to: [WooCommerce] Multiple add to cart buttons for different quantitiesI’m not sure what you mean?
Currently I’m editing the PHP file that generates the Add to Cart button, so I’m not doing this in the front end environment.
Would you suggest switching to that or is it more effective to do this in the back end?Forum: Plugins
In reply to: [WooCommerce] Multiple add to cart buttons for different quantitiesAwesome, that’s exactly what I was looking for.
But since it’s for about 400+ products, I was wondering if there is a way to use the product id instead of hardcoding it?