# Set the minimum price for marketplace offers

**URL:** <https://community.hivepress.io/t/set-the-minimum-price-for-marketplace-offers/2101>\
**Category:** Marketplace\
**Tags:** marketplace, requests\
**Created:** [September 29, 2022, 4:12pm UTC](https://community.hivepress.io/t/set-the-minimum-price-for-marketplace-offers/2101 "2022-09-29T16:12:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rudy](https://community.hivepress.io/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rudy](https://community.hivepress.io/u/rudy)\
**Post date:** [September 29, 2022, 4:12pm UTC](https://community.hivepress.io/t/set-the-minimum-price-for-marketplace-offers/2101/1 "2022-09-29T16:12:38Z")

</div>

Hello,

how to set a minimum price for offers, so vendors cant add a lower price than that? I am trying to use this snippet for a price of 10, but doesnt work ( i used the code that was for listings just change it to offers):

```auto
add_filter(
	'hivepress/v1/models/offers/attributes',
	function( $attributes ) {
		if ( isset( $attributes['price'] ) ) {
			$attributes['price']['edit_field']['min_value'] = 10;
		}

		return $attributes;
	},
	1000
);

```

---

<div class="post-metadata">

**Author:** ![yevhen](https://community.hivepress.io/user_avatar/community.hivepress.io/yevhen/32/23_2.png) [@yevhen](https://community.hivepress.io/u/yevhen)\
**Post date:** [September 30, 2022, 9:39pm UTC](https://community.hivepress.io/t/set-the-minimum-price-for-marketplace-offers/2101/3 "2022-09-30T21:39:26Z")

</div>

Please try this PHP snippet

```auto
add_filter( 'hivepress/v1/models/offer', 'change_offer_price_field' );
add_filter( 'hivepress/v1/forms/offer_make', 'change_offer_price_field' );

function change_offer_price_field($model){
	
	if ( hivepress()->get_version( 'marketplace' ) && get_option( 'hp_offer_allow_bidding' ) ) {
		$model['fields']['price']['min_value'] = 10;
	}
	
	return $model;
}

```

---

<div class="post-metadata">

**Author:** ![rudy](https://community.hivepress.io/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rudy](https://community.hivepress.io/u/rudy)\
**Post date:** [September 30, 2022, 10:41pm UTC](https://community.hivepress.io/t/set-the-minimum-price-for-marketplace-offers/2101/4 "2022-09-30T22:41:39Z")

</div>

Thank you @yevhen  
Works perfectly!

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [October 30, 2022, 10:41pm UTC](https://community.hivepress.io/t/set-the-minimum-price-for-marketplace-offers/2101/5 "2022-10-30T22:41:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
