# Disable price calculation

**URL:** <https://community.hivepress.io/t/disable-price-calculation/9173>\
**Category:** Bookings\
**Tags:** marketplace, bookings\
**Created:** [January 11, 2024, 4:18am UTC](https://community.hivepress.io/t/disable-price-calculation/9173 "2024-01-11T04:18:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnennis](https://community.hivepress.io/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@johnennis](https://community.hivepress.io/u/johnennis)\
**Post date:** [January 11, 2024, 4:18am UTC](https://community.hivepress.io/t/disable-price-calculation/9173/1 "2024-01-11T04:18:42Z")

</div>

I would like the total above the booking form ($1.00) to not automatically update as the listing is created. How might I do this?

 ![Screen Shot 2024-01-10 at 11.16.57 PM](https://community.hivepress.io/uploads/default/original/2X/f/f2bb6c057225daf03db7669f5305c66219896a46.png)

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [January 11, 2024, 10:08am UTC](https://community.hivepress.io/t/disable-price-calculation/9173/3 "2024-01-11T10:08:42Z")

</div>

Hi,

​Please send more details about this question, and we will do our best to help you.

---

<div class="post-metadata">

**Author:** ![johnennis](https://community.hivepress.io/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@johnennis](https://community.hivepress.io/u/johnennis)\
**Post date:** [January 11, 2024, 8:00pm UTC](https://community.hivepress.io/t/disable-price-calculation/9173/4 "2024-01-11T20:00:17Z")

</div>

Sorry, that was unclear. I meant to say “as the booking dates are selected.”

When a user selects a booking date, the hourly rate disappears and is replaced with the following (which I would like to disable and leave as the hourly rate):

 ![Screen Shot 2024-01-11 at 2.59.47 PM](https://community.hivepress.io/uploads/default/original/2X/2/2b5ca5158e6557794c8b6367334188f9d7d15a01.png)

---

<div class="post-metadata">

**Author:** ![johnennis](https://community.hivepress.io/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@johnennis](https://community.hivepress.io/u/johnennis)\
**Post date:** [January 11, 2024, 8:02pm UTC](https://community.hivepress.io/t/disable-price-calculation/9173/5 "2024-01-11T20:02:57Z")

</div>

This is the current code snippet in functions.php:

```auto
// LISTING PAGE
add_filter(
	'hivepress/v1/models/listing/fields',
	function( $fields, $model ) {
		if(isset( $fields['price'] )){
			if ( !hivepress()->helper->is_rest() ) {
				$fields['price']['display_template'] = '%value% / hour';
			}else{
				$fields['price']['display_template'] = 'Total: %value%';
			}	
		}

		return $fields;
	},
	1000,
	2
);

```

I would like %value% to not update when a user selects a date.

---

<div class="post-metadata">

**Author:** ![johnennis](https://community.hivepress.io/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@johnennis](https://community.hivepress.io/u/johnennis)\
**Post date:** [January 13, 2024, 4:21pm UTC](https://community.hivepress.io/t/disable-price-calculation/9173/7 "2024-01-13T16:21:26Z")

</div>

Hi Andrii - Do these new details make sense? Sorry if I’m not explaining it properly

---

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [January 15, 2024, 10:00pm UTC](https://community.hivepress.io/t/disable-price-calculation/9173/10 "2024-01-15T22:00:28Z")

</div>

I’m sorry for the delay. There should be no “Total:” part in the price format, please make sure that there are no other plugins or customizations that may cause this issue. I checked the code and unfortunately there’s no easy way to disable the price re-calculation, the HTML attribute that defines this behavior is set after all the PHP hooks (re-calculation occurs because of the `data-render` attribute on the purchase form, if you remove it via JS or another way it may work).

Hope this helps.

---

<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:** [February 14, 2024, 10:01pm UTC](https://community.hivepress.io/t/disable-price-calculation/9173/11 "2024-02-14T22:01:02Z")

</div>

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