Open to offers auction type

Discussion in 'Requests' started by hhavatar, Nov 10, 2015.

  1. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    I'd like to include an "open to offer" type auction system. Seller posts an asking price and buyers bid whatever they want during the auction period. Seller can accept at any stage during the auction period when they feel they've gotten a price they're happy.
    It's a mod I really want and am prepared to pay for it to be done. The code would obviously be available to whoever wants it here. Could be used as a walkthough for setting up a new auction type. PM me or reply if anyone's interested in working on this.
     
  2. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
  3. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    Could really do with as assist on this one folks. Serious about the cash offer too. $100 donation to have help get it done.
     
  4. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Check the resources section, mods board and do a forum search I am sure another member already posted a make offer mod
     
  5. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Found it in 2 minutes HERE
     
    david62311 likes this.
  6. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    thanks Nay. I saw this but it's unfinished and not what I'm after. I'm thinking an actual 3rd sale type. This seems more, send the seller a message with a bid.
    I'm thinking almost a clone of the second sale type but with an asking price field added in. Item displays this and the current bids. Auction end would not be shown in item.
    The seller can then go to the control panel and close the auction to accept the bid whenever they want.
    I tried doing that but couldn't get the php end to work.
     
    Last edited: Nov 18, 2015
  7. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    @nay27uk The sell.php is what's really catching me. If I can get a guide on adding a third sale type like this in here, I'll probably manage the rest myself.
     
  8. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Yeah it could be done but you would need to add the new type in the database that deals with auction types and possibly link that to another new table where offers are stored then change all the php and tpl files updating all the atypes values to include the new third one say atype=3 plus draw the offers table into the active auctions in the seller's CP and add the offers to the sellers CP reminders, create a new email template and link that up in the php as well as cron, on the cp of the offerers side you would need new pages including php adding in the CP for "your offers" etc etc. Not to mention that the mod would then require a total rewrite when the new version of WeBid comes out as the new WeBid will be all PDO.

    It is a hell of a lot to code and is virtually a mini rewrite of webid so I don't think anyone would do that kind / amount of work for $100 I wouldn't and even if I could code something like this I would want more like $600 thats about £400 GBP if I could code something like that, that kind of work I would charge at the least £250 GBP or $380 USD. Just my opinion though.

    I would hold out if I where you for the new version of WeBid that will be PDO then think about asking someone to make the mod for you.

    Did you drop renlok a conversation from this thread HERE.

    I will have a look at the code a bit later see how things are done there but I am no coder so don't get to excited and it will only be a quick look as it is not worth modding WeBid as I don't think the new version is too far away then all the mods currently available will no longer work on the new version as a lot use the old mysql and the new WeBid will be PDO.

    I linked to the other one as it is a good starting base for anyone wanting to do something like this of what files need to be altered and improved on.
     
    Last edited: Nov 18, 2015
  9. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    Thanks Nay. I appreciate the feedback. That's a hell of a lot of work alright. I've heavily modded the site as it is so won't be moving to the PDO version any time soon. I did PM renlok a while back but got no reply - from your explanation I can see why :)
    What I'm thinking now is a tick/dropdown box on sell.php with 2 options on it. If the "open to offers" is ticked, that pops open an asking price box. This feeds back to the database. Then put an if statement in item for the asking price display etc. Let the rest run as normal in the back.
     
  10. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Hmm give me a few weeks let me see what I can come up with.

    To be honest this is something I would like to see in WeBid as well because eBay offers this so to compete with eBay WeBid needs it, anything eBay has then WeBid should have and even more.

    Having said that though the eBay one works like you said with a check box and then you enter your lowest offer amount but then it also works exactly how I said in my reply, I know because I have both sold on eBay in an offers sale and purchased in an offers sale.

    Let me play for a few weeks but like I say I am not saying I can do this as there is too much coding, it is not as easy as you say .

    In the quote from you above.

    • Where is the email that is sent to the seller to say an offer of X amount has been made on item X?
    • Where is the reminder when the seller logs in and goes to his control panel saying you have an offer on X item for the amount on item X ?
    • Where is the sellers new accept or decline offer page?
    • Where does the seller decline the offer but enter a counter offer?
    • Where is the person that made the offers email saying you offered X amount on item X please wait for the seller to DEcline or Accept the offer?
    • Where is the person that made the offer when he logs in and goes to his control panel saying "your offer of" has either not been accepted or is still awaiting acceptance?
    • Where is the person that made the offers email saying "your offer has been declined" or "your offer has been accepted".
    • Where is the Email to the person that made the offer when the seller declines an offer but makes a counter offer?
    • Where is his new "You'r Offers" page like the buying page and winning bids page so he can track all his offers.

    + some others I thought of that have gone out of my head now

    There is more to this than simply a "tick/dropdown box on sell.php with 2 options on it" and "If the "open to offers" is ticked, that pops open an asking price box" and then "an if statement in item for the asking price display" and then that all "feeds back to the database".

    I would say that if you and a Partner / Friend can do and provided you both have an eBay account to try this on eBay first.
    You post an item on eBay that you can actually sell (as it will be live to the whole world so it can't be a non existent item) post it as an open to offers auction or an open to offers buy it now and get your Partner / Friend to make an offer, both of you take screenshots and share them with each other one of you as the seller and the other of you as the offerer, also share any emails that come just to see how it all works.

    There is a lot more to this than a simple checkbox that then loads a box to type a minimum offer amount that is then fed back to the database.
     
    Last edited: Nov 18, 2015
  11. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    The way I see it Nay, the bidding & monitoring would be done as is. We did a mod last year for reporting so that could be updated via a cron job to run say daily. If the seller gets an offer they're happy with, they just modify the sale reserve to that bid level and then close the sale in the control panel as is.
    You're dead right that this could be done in a very slick fashion (like the rest of the site). A lot of the existing site can be used differently I think. e.g the questions section could be used for communication regards the bids, the reporting mod can keep the seller updated. The offers would come in as regular bids, and be displayed on the item page

    I've mocked up a section in sell.tpl for the radio button end & if we set that back to the database. Clunky, absolutely, but a start.
    This is the code.
    HTML:
    <script type="text/javascript">
    function checkIt(el) {
    if (el.value == "other") {
    document.getElementById('text').style.display = "block";
    }
    else {
    document.getElementById('text').style.display = "none";
    document.getElementById('who').value = '';
    }
    }
    </script>
                      
                                <b>Sale Type</b>
                                <input type="radio" name="radio" value="one"
                                onclick="checkIt(this);">auction
                                <input type="radio" name="radio" value="other"
                                onclick="checkIt(this);">
    offers <br>
                                <div id="text" style="display:none;"><br><input type="text"
                                name="asking_price" id="ask_price" value="{ASK_PRICE}></div>
     
    Last edited by a moderator: Nov 19, 2015
  12. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    OK
    Does your bit of html work?
    Where are you struggling to get it to the database? making the database table or with the mysql statements?

    Moderator Note
    Could I please ask that when you post code that you use the correct forum BBcode Have a read of this post here it explains how to do it.
     
  13. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    On a roll now Nay. This conversation kind of redirected the thought process away from creating the new sales type into this simpler direction. The tpl works fine, the database is updated with the new field and the php is also amended. Testing will be tonight hopefully & then report back. Next step will be to pull that info into item but that's no biggie.
    Once complete, I'll post the full code here for everyone to have a garner.
     
  14. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,572
    Likes Received:
    546
    Awesome I am glad you managed to sort it and that the conversation here helped you alter what you where originally thinking.
    Be nice to see what you come up with.
    Thumbs up
     
  15. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    Reporting back.
    I've gotten sell.php & sell.tpl working(ish).
    I created a field in the database ASK_PRICE.
    in around line 480
    Code:
    'ASK_PRICE' => $system->print_money($ASK_PRICE, false),
    
    in around line 699
    Code:
    'ASK_PRICE' => $system->print_money_nosymbol($ASK_PRICE, false),
    
    in sell.tpl around line 286
    Code:
    <td class="rightpan">
                   <input type="radio" name="radio" value="one"
                   onclick="checkIt(this);">auction
                   <input type="radio" name="radio" value="other"
                   onclick="$('#bids').toggle();">
    open to offers <br>
    </td>
    <th colspan="2" align="center" valign="middle" class="leftpan">
                   <div id="bids" style="display:none;">asking price<br><input type="text"
                    name="asking_price" id="ask_price"  placeholder="asking price" value="{ASK_PRICE}"></div>
                   </th>
    
    This opens the asking price box when the box is ticked. The layout is a bit wonky, but more importantly this doesn't appear to be posting back to the database.
    Any suggestions?
     
    Last edited: Jan 13, 2016
  16. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    This sounds like a good addition. Make an offer mod, hhmm.
    Very good idea. Just running through the scenarios to see what we need to deal with.
    We need to have a think of how we can include it in having the full works.
    In the sell page we would have a tick box to activate the make an offer mod (keeping in mind we could also have a minimum value which will automatically send a declined message)
    Then in the item page show the make an offer, if activated. If an offer is made, send an email to the seller and save the offer for the item.
    Then on the CP we would have a link/message indicating an offer has been made on the item and how much it is. Then a few links made available: Accept, Decline or Make a counter offer.
    This will then send an email to the buyer and save the status too in the database.
    If declined that is the end. We could also make available a counter offer for the buyer to increase his offer?
    Buyer increases his offer and webid then sends an email back to the seller with the new offer.
    etc.
    Once an offer has been accepted by the seller, when the buyer logs in to buy the item, we have the agreed price available ready for him to click buy now.
    Just throwing some thoughts here.
    We would need to add a new auction type possibly, to include it in our searches.
    Or maybe a pseudo auction? It will be a normal auction which changes to a buy now once an offer has been agreed?
     
  17. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    That's exactly it Pani. The code above handles that tick box. Then a series of if statements can control the display on item.
    The CP has a "close now" option. What I was thinking is that once the seller has an offer they're happy with, the change the reserve to match the bid and then close the Auction.
    The emails advising the seller of the bids would be a great add on.
    Can you advise how I can get the ASK_PRICE to feed back to the sql and call it up on item.php please.
    Its probably really simple so apologies, mechanism just eluding me right now.
    I'll come back with the rest of the of mod as best I can.
     
  18. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Ok I fink you better open a thread in 'modding/theme help' for this mod and we can start progressing it in there. I am sure we can get this up and running quite easy. I have a bit of catching up and refreshing to do on the webid script.
     
  19. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    Draft mod now uploaded for consideration.
     
  20. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    This is now posting back to the database perfectly. I need to work on the conditional IF statements to customise display on item etc. I'll keeping editing the mod. Hopefully it gets approved.
     

Share This Page