Change the total booking price format

Hello, I’d like to add the text “Total stay” where the total amount of the reservation is displayed (here 158€ so Total stay 158€)- I can’t find the file that manages this block to customize the code. What’s more, when the text is added, it’s added to the unit price (price/night) because it’s the same block, but I want it to appear only when the quantity is selected and the total is displayed. Thanks


Please let me know if you have a developer for custom work, the snippet requires some research but I can provide guidance on the related hooks and functions.

1 Like

@ihor Yes I have a developer but he doesn’t understand the structure or logic of the theme, so yes it would be nice to give as much advice as possible on hooks, elements, tags… and especially the file that manages the reservation blocks and the dynamic “total amount” tag thank you.

I’m sorry for the delay. If you have a developer please ask them to use the hivepress/v1/fields/currency/display_value filter hook Filter: hivepress/v1/fields/{field_type}/display_value | HivePress Hook Reference This way it’s possible to set the display value format or customize it in any way. The main issue is affecting only the price after the calculation, I recommend using a condition to check if the field name equals to “price” and also if it’s a REST request (this way only the calculated amount will be affected since it’s refreshed via REST), you can try this function to check this:

hivepress()->helper->is_rest()

Hope this helps.

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