Need some guidance creating an auction extension

I am migrating from my current CMS to Wordpress/Hhivepress. The current website has features Hivepress currently has not. One of which is the posibility for a vendor to employ the Auction model but there are others as wel.

I have been reading the developer docs but is unclear how to go about it regarding best pratice within the framework. As far as i understand it is possible to customize an existing Model but i can not find any informtion on extending an existing model.

In order for a Listing to determine which pricing model is used by the vendor, at least the pricing model should live within the Listing Model in order to subsequently load the relevant data for the pricing model.

How would i go about this?

PS. I understand that the current database scructure is based on the standard wordpress tables, this has me slightly worried performance wise, because in my case it would result in all the data being distributed over only these 3 tables, whilst on my current situation where each logical structure has its own table. Despite millions of entries in the database, the speed is fast and memory consumption low. How well does Hivepress scale? Is there experience in running 100k+ listings and and what hardwere setup would i be looking at?

Hi,

It’s possible to implement any custom functionality within HivePress, but it depends on the requirements. We tried to develop HivePress as customizable as possible while keeping it lightweight.

For example, if you mean allowing buyers to make bids you can check how offers are implemented in the Requests extension and use the same approach. Then it depends on the requirements, for example you can override the listing price with the highest bid every time a new bid is made, also I assume some functionality to close bidding and notify the seller and buyer via email would be needed.

It’s possible to customize the model fields via hooks, please check examples by searching the listing model hook Search results for 'hivepress/v1/models/listing' - HivePress Community If there’s no complex logic, you can also add listing fields without code, for example you can add a Type select field in Listings/Attributes, with 2 options (Regular and Auction). Then you can check the selected value in the code, applying the auction logic if Auction is selected for a listing.

Regarding the performance, WordPress itself (even without HivePress) would need some optimization with millions of entries; it’s more suitable for building MVPs and optimizing/replacing specific functionality as the website grows (e.g., replacing messaging with an external API if it starts causing performance issues). With 100k listings, it should be ok, given some optimization (I recommend using LiteSpeed with OpenLiteSpeed server). This also depends on the search filters, each extra filter may slow down the search because of the query on the same database table. We plan to implement “lookup” tables synced with the main one to resolve this issue in future updates.

Hope this helps

Thanks.

The logic is more then just select the pricing model, considering there can be different required input fields depending on the pricing model.

Currently i have 3 types:

  1. Open offer. This requires 3 input → Price, UpperLimit, LowerLimit.

  2. Buy it now. This requires 1 input → Price.

  3. Auction. This requires 3 inputs → StartPrice, ReservePrice, BuyItNowPrice.

How would i go about this front end wise? As far as i understand, conditional form fields are not possible. Also creating a different PostType for each pricing model is, as i understand it, not an option because then it will require a different search page for each pricing model.

Example. There is a category Marketplace->Microwaves. A Seller can auction off a listed Microwave, List it with a Buy it now, or List it with open offer.

In this example the main logical structure would be that all Microwaves are listed in 1 category, just with different pricing models, instead of 3 categories of different pricing models all concerning the same product.

I hope the example is clear.

You can add a Select attribute (e.g. Offer Type) in Listings/Attributes, and all the dependent fields (e.g. Min Price, Max Price, etc) while keeping them optional. Then, it’s possible to show/hide corresponding fields depending on the Offer Type choice, here’s a sample JS snippet Show and Hide Custom Attribute based on Select Also, PHP snippet is needed for the hivepress/v1/forms/listing_update/errors to conditionally require field values (e.g. if the offer type is “open offer”, then check if min/max price fields are empty, and if so you can show an error).

This way you can collect the required details from sellers (the offer type and related pricing depending on the selected type). Then you’d have to implement front-end features for each offer type, e.g. for the auction there should be some form for buyers to make bids, and close bidding when the offer expires, for example as described in the previous post.

Hope this helps

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