Open to offers sale WeBid 1.1.0 ONLY

how to add an open to offers type of sale

  1. hhavatar
    WeBid Version:
    • 1.1.0
    This is what I've done so far.
    Step 1.
    Access phpadmin and run the following query.
    Code:
    ALTER TABLE webid_auctions ADD asking double(16,2) default '';
    
    Step 2
    Open sell.php
    In around line 480, find
    PHP:
    'MIN_BID' => $system->print_money($minimum_bidfalse),
    replace with
    PHP:
    'MIN_BID' => $system->print_money($minimum_bidfalse),
               
    'ASKING' => $system->print_money($askingfalse),
    In around line 698 find
    PHP:
    'MIN_BID' => $system->print_money_nosymbol($minimum_bidfalse),
    Replace with
    PHP:
            'MIN_BID' => $system->print_money_nosymbol($minimum_bidfalse),
             
    'ASKING' => $system->print_money_nosymbol($askingfalse),
    save and close sell.php

    Step 3.
    open sell.tpl
    In around line 285, find
    PHP:
    <tr>
                 <
    th colspan="2" align="center" valign="middle" class="leftpan">
                   {
    L_640}
                 </
    th>
               </
    tr>
               <
    tr>
                 <
    td align="right" width="25%" valign="middle" class="leftpan">
                   <
    b> </b>
                 </
    td>
                 <
    td class="rightpan">{ATYPE}</td>
               </
    tr>
    Above it, add
    PHP:
    <b>{L_257}</b></td>
    <
    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;"><input type="text"
                    
    name="asking" id="asking"  placeholder="asking price" value="{ASKING}"></div>
                   </
    th>
    save and close sell.tpl

    Step 4.
    Open item.php
    in around line 270 insert the following
    PHP:
    'ASKING' => $system->print_money($auction_data['asking']),
    in around line 480 add
    PHP:
    'ASKING' => $system->print_money($askingfalse),
    in around line 633 add
    PHP:
    'B_HASASKING' => ($auction_data['asking'] > 0),
    save and close

    Step 5
    Open item.tpl
    in around line 480 find
    PHP:
    {L_119}: {NUMBIDS}
    afterwards insert
    PHP:
      <!-- IF B_HASASKING -->
    <
    small><b>asking price</b> {ASKING}</small>
      <!-- ENDIF -->
    save and close.

    Step 6.
    Open functions_sell.php
    in around line 34, insert
    Code:
    $asking
    
    In around line 52 insert
    Code:
    $asking= (isset($_POST['asking'])) ? $_POST['asking'] : $_SESSION['SELL_asking'];
    
    in around line 110 insert
    Code:
    $asking,
    
    in around line 124 insert
    Code:
        $_SESSION['SELL_asking'] = $asking;
    
    in around line 162 insert
    Code:
    $_SESSION['SELL_asking'] = '';
    
    in around line line 204 insert
    Code:
    asking= '" . $system->input_money($_SESSION['SELL_asking']) . "',
    
    in around line 246 insert
    Code:
    asking,
    
    in around line 247 insert
    Code:
    $system->input_money($_SESSION['SELL_asking']) . "', '" .
    
    Note all the spaces in this one. Very important.
    Save and close

    Step 7.
    open {SITEURL}/admin
    clear cache.

    This has been tested & works. We now need to choose what to display in item, bid etc with IF statement in 5 above.
    Medet likes this.