Closed rayedgar closed 1 year ago
If you set "Hide availability if greater than" to "1%", indeed, the availability will most likely always be hidden (unless your events availability is very high). Set it to to a higher percent to keep the availability displayed a bit more. E.g.: if your events availability is "20", then set it to "30%" to display the availability between 0 and 6.
You cannot achieve the same as WC without custom code. Booking Activities only allows to hide the event availability if greater to a certain percent. #140 describes how to add "only" before and "!" after the availability text with CSS only, but it would be regardless of the remaining number. If you need to take the avilability number into account, you would need to make custom javascript code.
Note that in the next release, the "Hide availability if greater than" option will hide (in CSS) the whole availability text instead of hiding only the number.
Oh, sorry, regarding the "Beschikbaar" that is not displayed, you may be missing a translation (the "avail." text must be translated in both singular and plural), see the instructions below "Translate Booking Activities into my language" here: https://booking-activities.fr/en/documentation/faq/
Ah yes! the plural setting, that makes sense. i will await your next version. i hope it gives more flexibility to the quantity settings. for instance a differentiation in message between full, 1 and threshold particle text. Many Thanks
Sorry this feature is not planned, the next version will simply hide (in CSS) the whole availability text instead of hiding only the number.
I have noted your feature request, thank you.
Thank you!
I cannot provide support for custom code, but here is an example in the hope to help:
/* Lots of places available */
.bookacti-availability-container.bookacti-hide-availability { display: block; }
.bookacti-availability-container.bookacti-hide-availability .bookacti-available-places-number::before { content: "Lots of "; }
/* Few places left */
.bookacti-availability-container:not(.bookacti-hide-availability) .bookacti-available-places-number::before { content: "Only "; }
.bookacti-availability-container:not(.bookacti-hide-availability) .bookacti-available-places-avail-particle::after { content: "!"; }
/* Full */
.bookacti-availability-container .bookacti-full > span { display: none; }
.bookacti-availability-container .bookacti-full::before { content: "Full"; }
Result example:
thank you, that works!
I am a bit puzzled. I am trying to hide availability(quantity particle text) if greater than 0. Availability setting is on 1%. But it already removes the particle 'beschikbaar'on quantity of 1 instead of 0. and the quantity becomes hidden.
I removed all custom code and css.
What I eventually would like to achieve is the same, the way WC does:
QUANTITY PARTICLETEXT 0 FULL 1-3. only x available! (set threshold) 4-infinite x available