bookingactivities / booking-activities

Wordpress plugin booking system
GNU General Public License v3.0
29 stars 10 forks source link

Only X available #140

Closed rayedgar closed 2 years ago

rayedgar commented 2 years ago

Is there a way to, just like in woocommerce set a filter to only show a few in stock (with a threshold) or no show option?

ideally: 1) show nr in stock 2) only show when threshold is below x 3) no show (ofcourse that can be done with css)

yoancutillas commented 2 years ago

Yes, you can find the option in Booking Activities > Booking forms > your form > Calendar settings > Display tab > "Hide availability if greater than"

rayedgar commented 2 years ago

Thats great!, However i see that indeed the quantity is shown depending on the setting but the Particle displayed after the number of available places is not hiding when needed.

Another minor question or future request: 'Only x remaning'. Would it be possible to have a particle before and after the quantity?

yoancutillas commented 2 years ago

Yes indeed, only the number is hidden, so that if the event is available it is still written "seats avail." for example.

You can hide the unit name via CSS: .bookacti-availability-container.bookacti-hide-availability .bookacti-available-places-unit-name { display: none; } or hide the whole text: .bookacti-availability-container.bookacti-hide-availability { display: none; }

You can display a particle with CSS too:

.bookacti-available-places .bookacti-available-places-number::before { content: "before "; }
.bookacti-available-places .bookacti-available-places-number::after { content: " after"; }

in Appearence > Customize > Additional CSS.

I cannot provide support for custom code, this is in the hope to help only, it can be customized as desired, and it needs to be maintained.

rayedgar commented 2 years ago

Yes, this helps. Many thanks.