# 'Custom' product bundles with price set by quantity in the bundle

**URL:** <https://forum.modmore.com/t/custom-product-bundles-with-price-set-by-quantity-in-the-bundle/2489>\
**Category:** Commerce\
**Created:** [August 19, 2023, 3:04pm UTC](https://forum.modmore.com/t/custom-product-bundles-with-price-set-by-quantity-in-the-bundle/2489 "2023-08-19T15:04:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [August 19, 2023, 4:25pm UTC](https://forum.modmore.com/t/custom-product-bundles-with-price-set-by-quantity-in-the-bundle/2489/2 "2023-08-19T16:25:56Z")

</div>

I’d probably go the route of a custom add to cart snippet for this.

Build the interface with checkboxes, submit the product ids (optionally with Ajax), do the math based on the business rules, and use that to add an order item with either item adjustments (like ItemOptions) or properties (like ItemData).

> [@Extending comOrderItem / adding custom products to cart](https://forum.modmore.com/t/extending-comorderitem-adding-custom-products-to-cart/1187/5):
>
> Was looking for this code just now, so figured I’d post it here even though it’s a rather old topic wink Sorry for not getting back to you before. First, load up Commerce and the current order \<?php use modmore\Commerce\Frontend\Checkout\Standard; use modmore\Commerce\Frontend\Steps\Cart; // Instantiate the Commerce class $path = $modx-\>getOption('commerce.core\_path', null, MODX\_CORE\_PATH . 'components/commerce/') . 'model/commerce/'; $params = ['mode' =\> $modx-\>getOption('commerce.mode')];…

---

_[View the full topic](https://forum.modmore.com/t/custom-product-bundles-with-price-set-by-quantity-in-the-bundle/2489)._
