Setup fees depending on $atype

Discussion in 'Modding/Theme Help' started by drakky20, Apr 29, 2012.

  1. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    hi
    I was wondering where the base auction setup fee is , basically what I want is to have 2 listing types basically both the standard auctions(completely removing dutch auctions) example Personal Auction and Business Auction then have 2 different setup fees for each type example $2 for Personal Auction listing and $5 for Business Auction listing

    can anyone throw me a few clues as to how to do this I've been fiddling in the code but can't sem to find where the auction setup fee is applied in the script

    thanks
     
  2. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    1,995
    Likes Received:
    349
    Hello drakky20,
    The setup fees for the auction are pulled from the bellow in sell.php
    the query:
    $query = "SELECT * FROM " . $DBPrefix . "fees ORDER BY type, fee_from ASC";

    and the folowing:

    $fees = array( //0 = single value, 1 = staged fees
    'setup' => 1,
    'hpfeat_fee' => 0,
    'bolditem_fee' => 0,
    'hlitem_fee' => 0,
    'rp_fee' => 0,
    'picture_fee' => 0,
    'buyout_fee' => 0,
    'subtitle_fee' => 0,
    'relist_fee' => 0
    );

    The => 0 are easy to change around, the staged ones not played with them.
    Maybe you could add another row in fees table and use that. Or use an if statement to unfold which you want to include.
    I would try with single value first. Just follow one of the single ones and see if you can add it to the system as the one you are following.

    They are controlled with the statements under that like
    if ($row['type'] == 'buyout_fee' && $buy_now_price > 0)
    {
    $fee_bn = $row['value'];

    }
    You could try to add business_auct
    with if ($row['type'] == 'business_auct' && "user is bussiness statment" )
    {
    $business_auct = $row['value'];

    }

    They are all added in includes/functions.sell.inc.php with get_fee($minimum_bid)
     
    drakky20 likes this.
  3. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    thanks pani100
    just another question could you explain what staged fees and single fees mean please ? as I don't get what those terms mean
    thanks
     
  4. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    nevermind i think i worked it out staged is from value to value ones and single value is flat fees
     
  5. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    1,995
    Likes Received:
    349
    Yep, that's it. Can you keep us posted how you progress as in a week or 2 I will be probably attempting something similar with some sort of a business user mod with fees etc.
     
  6. drakky20

    drakky20 New Member

    Joined:
    Mar 11, 2012
    Messages:
    252
    Likes Received:
    20
    yes soon as i get it working i'll post it up might take a few weeks lol wish i knew php and javascript
     
  7. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    4,129
    Likes Received:
    298
    I second that statement, but even with most of the members on here not being coders we all seem to do a fantastic job, thats the joy of webid, in part it is easy to code
     

Share This Page