Display the quantity field only for regular listings and not for rental listings

Hello everyone, here’s my situation:
On my website, there are 2 categories of listings: equipment for sale and equipment for rent. I wanted to hide the listing once an item is sold, and to achieve this, I had to enable quantities. Now, I need to display the quantity field only for regular listings and not for rental listings. How can I do this?

Thanks in advance.

Hi,

If you use the Bookings extension, you can restrict the category using this doc: How to restrict booking to specific listing categories - HivePress Help Center, then all other categories will have the quantity option available. If you use the Marketplace extension, you can restrict the category using this doc How to restrict selling to specific listing categories - HivePress Help Center.

I tried, and at first glance, it seems to work (the ‘quantity’ field is not displayed in the ‘equipment rental’ category). The issue is that now, when I create a booking type listing, the product is not being created in the backend. For safety, I left the sales categories field empty, and it started working again… How can this be resolved

Hi,

Please note that if you use the Bookings and Marketplace extension, I recommend restricting categories only using this doc How to restrict booking to specific listing categories - HivePress Help Center, then all other categories that are not restricted will fall under the Marketplace selling, and there will be a quantity.

Hello, I did as you instructed (attached screenshot), but I’m encountering the following error at the time of booking.

Hi,

Please provide more details on what kind of issue you are referring to, because there is nothing in the screenshot and we will try to help.

Hi, I’ll try to be as clear as possible. My website has two categories: equipment for sale and equipment for rent. I have restricted the booking function for the rental category and the selling function only for the sales category. (All of this is because I need that once a sale ad is purchased, it gets hidden. Therefore, I had to enable quantities, but I don’t want the field to be shown in booking ads.) The problem is that if I try to pay for a booking ad, the website says “something went wrong.” If I remove the selling restriction on the sales category, everything works correctly, but the quantity field is also shown in the booking ads. Can you help me?

Hi,

As I have clarified in previous messages, you do not need to use this restriction How to restrict selling to specific listing categories - HivePress Help Center, using only the booking categories restriction. For example, you have two categories, hotels and laptops, you go to HivePress > Settings > Bookings > Booking Categories and specify only the hotels category, so the laptops category will not have a booking, but only a quantity display and the ability to buy, but the hotels category will have a booking display but no quantity.
Also, please note that if you see the quantity in bookings, then you most likely have the guest feature enabled How to add guests to bookings - HivePress Help Center, as quantity does not work with bookings.

I followed your instructions, but the quantity is still being displayed in the booking ads. I tried looking for the guest function, but I can’t find it. Can you help me? I’ve attached a screenshot. Is it possible to disable it using a PHP script?

Hi,

Please send a link to the booking where the quantity is displayed, or a screenshot of this booking, and we will try to help.

Of course! If you want to run some tests, you can try creating the two types of ads yourself:

Hi,

We checked this issue and the quantity is not displayed on the booking page. Do I understand you correctly that the quantity is displayed on the listing add page regardless of the category specified?

Exactly, the field is displayed among the fields to be filled in when creating a booking type listing. Can we avoid displaying it in the rental category?

Hi,

Unfortunately, there’s no such feature, it would require a custom implementation.

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