Listing items with start price > 1000

Report issues with Enuuk Auction Platform or Mods here - remember to raise a ticket with phpauction.net as well
Post Reply
RWAP
Site Admin
Posts: 748
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

Listing items with start price > 1000

Post by RWAP » Thu Nov 30, 2017 5:03 pm

There is a bug in class\Fee.php which means if you list an item with a start price of over 1000, you never get charged any fees - they are simply not added to the frozen fee table.

In Class\Fee.php, find:

Code: Select all

            $sql = 'insert into '.self::FEES_USERS_TABLE.'
                    (feeId, userId, `date`, amount, offerId, comment)
                    values
                    ("'.$this->_action.'", "'.$user->id.'", "'.$date.'", '.number_format(-$tempBalance, 2).',
                    '.($offerId && $offerId!='' ? $offerId : 'null').', "'.$comment.'")';
Change this to:

Code: Select all

            $sql = 'insert into '.self::FEES_USERS_TABLE.'
                    (feeId, userId, `date`, amount, offerId, comment)
                    values
                    ("'.$this->_action.'", "'.$user->id.'", "'.$date.'", '.-$tempBalance.',
                    '.($offerId && $offerId!='' ? $offerId : 'null').', "'.$comment.'")';
Find:

Code: Select all

            $sql = 'insert into '.self::FROZEN_TABLE.'
                    (feeId, userId, baseValue, offerId, comment)
                    values
                    ("'.$this->_action.'", "'.$user->id.'", '.number_format($base, 2).',
                    '.($offerId ? $offerId : 'null').', "'.$comment.'")';
Change this to:

Code: Select all

            $sql = 'insert into '.self::FROZEN_TABLE.'
                    (feeId, userId, baseValue, offerId, comment)
                    values
                    ("'.$this->_action.'", "'.$user->id.'", '.$base.',
                    '.($offerId ? $offerId : 'null').', "'.$comment.'")';
The number_format was adding in an extra comma which was throwing the SQL call !

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest