# Making price or tiers optional but one of them must be filled out

**URL:** <https://community.hivepress.io/t/making-price-or-tiers-optional-but-one-of-them-must-be-filled-out/3462>\
**Category:** Marketplace\
**Tags:** marketplace\
**Created:** [December 19, 2022, 8:55am UTC](https://community.hivepress.io/t/making-price-or-tiers-optional-but-one-of-them-must-be-filled-out/3462 "2022-12-19T08:55:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![obey24com](https://community.hivepress.io/user_avatar/community.hivepress.io/obey24com/32/2878_2.png) [@obey24com](https://community.hivepress.io/u/obey24com)\
**Post date:** [December 19, 2022, 8:55am UTC](https://community.hivepress.io/t/making-price-or-tiers-optional-but-one-of-them-must-be-filled-out/3462/1 "2022-12-19T08:55:17Z")

</div>

Hi guys, so thanks to your snippets, I made the price-field optional.

I find it confusing, that the user can set a price, but when they set tiers, it will just ignore the value of the price field instead of adding it. So now there are two ways for me for which I would need help:

A) Make both fields optional (price and tiers price) **but** the user needs to chose one of them.  
B) Make the price-field required, but it should be added to any of the tiers, so if the price is 100€ and the client chooses for a tier which costs 50€, the tier-price must be added to the total amount, which would be 150€.

Is there a code snippet for these solutions?

---

<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:** [December 20, 2022, 10:37am UTC](https://community.hivepress.io/t/making-price-or-tiers-optional-but-one-of-them-must-be-filled-out/3462/4 "2022-12-20T10:37:01Z")

</div>

Hi,  
Please consider leaving it as is because it seems to work this way by default. If you don’t want tiers by default - just set the price (this is 1 tier). If you want several options - enter the tier and leave any price in the field, the first tier will overwrite it.

---

<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:** [January 19, 2023, 10:37am UTC](https://community.hivepress.io/t/making-price-or-tiers-optional-but-one-of-them-must-be-filled-out/3462/5 "2023-01-19T10:37:07Z")

</div>

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