Results 1 to 7 of 7
  1. #1
    Registered User/Coder
    Join Date
    Mar 2012
    Posts
    252

    Default Setup fees depending on $atype

    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. #2
    Registered User/Coder pani100's Avatar
    Join Date
    May 2011
    Location
    London
    Posts
    1,609

    Default

    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)
    1 out of 1 members found this post helpful.

  3. #3
    Registered User/Coder
    Join Date
    Mar 2012
    Posts
    252

    Default

    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. #4
    Registered User/Coder
    Join Date
    Mar 2012
    Posts
    252

    Default

    nevermind i think i worked it out staged is from value to value ones and single value is flat fees

  5. #5
    Registered User/Coder pani100's Avatar
    Join Date
    May 2011
    Location
    London
    Posts
    1,609

    Default

    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. #6
    Registered User/Coder
    Join Date
    Mar 2012
    Posts
    252

    Default

    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. #7
    Super Moderator/Coder/Designer nay27uk's Avatar
    Join Date
    Nov 2009
    Location
    Leicester, UK
    Posts
    3,649

    Default

    Quote Originally Posted by drakky20 View Post
    yes soon as i get it working i'll post it up might take a few weeks lol wish i knew php and javascript
    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •