Title: Custom cart functions
Last modified: November 11, 2020

---

# Custom cart functions

 *  Resolved [shaikh441](https://wordpress.org/support/users/shaikh441/)
 * (@shaikh441)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/custom-cart-functions/)
 * Hello,
    I am trying to add some custom functions to my site to achieve the below:
 * 1) Customer adds in 3 of the same product and automatically receives free additional
   product
 * 2) Customer adds a specific set of products into cart, the total is set to be
   a specific amount regardless of their individual prices.
 * Is anyone able to assist with the function.php code required to achieve this?
 * Any help much appreciated

Viewing 1 replies (of 1 total)

 *  [Denys Zaikin](https://wordpress.org/support/users/zdenys/)
 * (@zdenys)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/custom-cart-functions/#post-13744206)
 * Hi there [@shaikh441](https://wordpress.org/support/users/shaikh441/)!
 * > Customer adds in 3 of the same product and automatically receives free additional
   > product
 * You can use [Buy One Get One Free](https://woocommerce.com/products/buy-one-get-one-free/)
   extension for this purpose. It does support [the scenario you described](https://docs.woocommerce.com/document/buy-one-get-one-free/#section-15).
 * > Customer adds a specific set of products into cart, the total is set to be 
   > a specific amount regardless of their individual prices.
 * You can maybe consider using [Product Bundles](https://woocommerce.com/products/product-bundles/)
   that allows grouping items and set the price for the entire bundle instead of
   the individual prices of its components.
 * If you want to try any of the above products, there is a 30-day refund policy.
   If the product doesn’t work the way you need or you think another product would
   work better, you can request a full refund [http://woocommerce.com/refund-policy/](http://woocommerce.com/refund-policy/)
 * If the above won’t meet your needs, maybe you’ll need to hire someone to build
   the features you described. [WooCommerce Customizations Page](https://woocommerce.com/customizations/)
   will help you find someone.
 * I hope that’s helpful and points you in the right direction. Let us know if you
   have more questions.

Viewing 1 replies (of 1 total)

The topic ‘Custom cart functions’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [cart](https://wordpress.org/support/topic-tag/cart/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [function](https://wordpress.org/support/topic-tag/function/)

 * 1 reply
 * 2 participants
 * Last reply from: [Denys Zaikin](https://wordpress.org/support/users/zdenys/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/custom-cart-functions/#post-13744206)
 * Status: resolved