Title: RoofTurkey's Replies | WordPress.org

---

# RoofTurkey

  [  ](https://wordpress.org/support/users/roofturkey/)

 *   [Profile](https://wordpress.org/support/users/roofturkey/)
 *   [Topics Started](https://wordpress.org/support/users/roofturkey/topics/)
 *   [Replies Created](https://wordpress.org/support/users/roofturkey/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/roofturkey/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/roofturkey/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/roofturkey/engagements/)
 *   [Favorites](https://wordpress.org/support/users/roofturkey/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Multiple add to cart buttons for different quantities](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/)
 *  Thread Starter [RoofTurkey](https://wordpress.org/support/users/roofturkey/)
 * (@roofturkey)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/#post-6149631)
 * It 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Multiple add to cart buttons for different quantities](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/)
 *  Thread Starter [RoofTurkey](https://wordpress.org/support/users/roofturkey/)
 * (@roofturkey)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/#post-6149619)
 * For 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Multiple add to cart buttons for different quantities](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/)
 *  Thread Starter [RoofTurkey](https://wordpress.org/support/users/roofturkey/)
 * (@roofturkey)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/#post-6149599)
 * I’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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Multiple add to cart buttons for different quantities](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/)
 *  Thread Starter [RoofTurkey](https://wordpress.org/support/users/roofturkey/)
 * (@roofturkey)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/multiple-add-to-cart-buttons-for-different-quantities/#post-6149591)
 * Awesome, 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?

Viewing 4 replies - 1 through 4 (of 4 total)