Skip Navigation

[Resolved] How to create an dynamic auction custom post?

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Author
Posts
#2117915

Hi support,

I am not sure does this can be created with Toolset, so I need to ask...
I'm trying to create "auction custom posts" where registered users can put their money offers for some service...

So, on a custom post should be some kind of a view table with their username (nickname), time of offer, the amount... etc.
And of course, an input form to give another offer.
Does it possible to create with Toolset?

Likely I need some usual custom post about a service or product (created by a user), then I need another custom post called "Auctions", then I need to create a "triple relationship" such as 'Product/Service custom post' to 'Auction custom' to 'Users' (one to one to many).
So to every "product/service custom post" belongs one "Auctions custom post" related to the Relationships plugin (and to users).

So products/service custom post will be created with the Post CRED form, Auction custom post by Administrator (or maybe by a click of a user what creates product/service custom post, I think it is possible to get empty auction post and its Toolset View on the frontend of the first post)
But how to create a form for input amount of user offers on such auction post?
Obviously, I need some kind of "fields CRED form" not for an entirely new custom post, maybe with the "Edit Form" of the auction custom post I can get something?
But then how to put various offers from various users in one same custom Auction post, with ascending(/descending order...

Do you know the solution for these steps or a different approach?

Thanks in advance
Sinisa

P.S.
This problem can be your new course video because it completes most of the Toolset possibilities.

#2117999

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting Toolset support.

I might agree that this could be a good candidate for a new tutorial. So, I am going to suggest it to our documentation team.

I believe this can be done using Toolset, and I agree on some points and disagree on others, so I'll try to explain how I see this can be done:
- A custom post type for product or service.
- A custom post type for auctions.
- A custom fields group that will hold the auction price, and the field should be marked as required.
- A one-to-many relationship between product/service and auctions. So, a product can have many auctions, but an auction is always about one product.
- A form to create a product/service post.
- A content template assigned to product/service.
- A form to create an auction, and connect it directly to its parent product/service.
- A view to display the auctions that were created for a product/service.

The link, between products/services or auctions to users, will be handled by the author field. When a user creates a product/service, he will be the author of it. When another user creates an auction he will be the author of it.

This way, the view will only be displayed(if that's what you are looking for) for the author of the product/service. It could also be displayed for every user, but that's yours to decide. The view will be used within the product/service content template and will query the auctions that are related to the post(product/service) where the view is displayed.

This being said, I don't see a use for an edit form. Maybe I am missing something!

I hope this makes sense. Let me know if you have any doubts about something or if it is not clear enough and I'll do my best to help.

#2118621

Hi Jamal!

Thank you for your fast and prompt answer... Most of your explanation is understandable and I will try to create like that.

But, what can be a problem...

I don't see a point that some other user creates an "Auction" for someone other "product/service". Auction table (custom post) should be created by admin or by a user who created a "product/service" post (one-click predefined custom post) at some moment when he wants...

Auctions aren't other offers, offers are bids of customers/users and it can have one filed for the amount and few automatics pulled fields (date/time, user ID, etc) inside one Auction, so every product/service can have just one auction, what is a table with all given bids (offers).
In this case, it should be another custom post type with a dynamic content template and/or a Relationships View in the product/service post.

I'll try to explain what bothers me, in this example.

- Some user will submit their product/service via the frontend form (custom post type "service or product" , so the content template is already created for it), the post goes on "pending" status, and wait for approval by Admin...
Example: User creates "Sell Printer ip550" custom post via frontend form.
- Administrator will check that pending user-submitted post and make approval for it, and Admin will create a new (add new) "Auction" custom post (custom post type "Auction" is already created with custom fields, and the content template for it) .
Example: Admin creates "Auction sell printer ip550" custom post (post with a table where all users offer will be presented)
- Admin will mark relationship (already created relationship "One to One" between custom posts "Service or product" - "Auction") in the edited custom post before change status to" published".
Admin can put just a link to created Auction post in some line inside service/product post, but I think it is good to have a short dynamic table already inside of the "Service or product" custom post, created with Toolset View or Relationship View with a link to open a full page of that auction custom post (with a big table, comments, image, etc.).

So far so good. 😉

But how to create a frontend Form that will be input for user offers (bid amounts) ? Offers aren't new custom posts, just new field data...
I thought that such a custom field (bids) can be already created in "Auctions" and with some Edit form (just with one field for amount) on the frontend, various users will give their money offers.
Likely we need some kind of "Fields frontend form" (just for fields, not to create an entirely new post), so that is a reason why I want to use 'Edit form'.

Another problem is how to sort those offers in the auction table from various users where all offers should be visible.

So I have two custom posts, one content template (product or service), triple relationships (one to one to many= product or service-auction-users), relationships Toolset view (for table), and optionally content template for full-page auction (with comments, images, etc.)

Ok. I hope that my idea is more clarified...
Thanks in advance
Sinisa

P.S.
There is no good auction plugin, all of them are related to WooCommerce or eBay, so If Toolest can manage it, will be good.
I need generic, for now without connection to the payment gateway, maybe later will come to need that.--

#2118807

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback. And sorry, I misunderstood auction for an offer or a bid.

Honestly, If you are going, lately, to accept online payments, I would suggest using WooCommerce. Not, that I am saying this can't be done by Toolset. Our Toolset is a very powerful suite of plugins 🙂

I still disagree with having an edit form to submit bids. And I still think that bids/offers should be a separate custom post type.

By using a separate custom post type, the relation bid-user is available out of the box in the author field. And it will give more flexibility and features. For example, in the future, listing the bids that a user has submitted will be very easy(a view filtered by the author).

Personally, I can build this in two ways, let's agree to call the product/service a listing:
- 2 post types(Listing, Bids), the auction data could be just custom fields on the Listing post type.
- 3 post types(Listing, Auction, Bids), this will give more flexibility such as, we can know exactly which administrator has created the auction, we can send him email notifications of bids without spamming all other administrators.

In the first case, we'll need only one relationship, a one-to-many relationship between a listing and its bids.
In the second case, we'll use a one-to-one relationship between a listing and its auction, and a one-to-many relationship between an auction and its bids.

I hope this makes sense, and please ask any questions if something is not clear.

#2118823

Hi Jamal,

yes, I'll try to make with three custom posts (Listing, auction, bids) in the next few days, I hope this ticket can be open for a while...
I will inform here about progress especially if I stack somewhere...

Thank you for your effort!
Sinisa

P.S. I don't need woo-commerce for now because my first site will be a reversal auction, business entities will give their demands not offer for some services they can provide...
So they need to receive money not to pay (for example someone needs to fix website, so developers will post their demands for such service)

#2118835

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you, Sinisa,

Sure, I'll set this ticket as waiting for your feedback which should keep it open for 2 weeks. You will receive an email notification before it is closed.

However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I would suggest marking this ticket as resolved, as it is rather general than related to something specific.

And you can always open a new ticket when you need further assistance with any step of the work. Explain what you have done so far, and at what point you are stuck.

All the best,
Jamal

#2130367

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.