Ensure Start Price is entered

Details of modifications which users can incorporate within Enuuk Auction Platform free of charge
Post Reply
RWAP
Site Admin
Posts: 748
Joined: Fri Jan 08, 2010 2:23 am
Location: Stoke-on-Trent
Contact:

Ensure Start Price is entered

Post by RWAP » Mon May 17, 2010 9:22 am

At the moment, when creating a new auction, you can have a null string or 0.00 as the start price for an auction.

To set this to a minimum of £0.01, you need to make a minor alteration to class\Action\Offer.php

Find;

Code: Select all

            $offer->endDate     = date('Y/m/d H:i:s', strtotime($fullDate) + 3600*24*$par['duration']);
            $offer->startPrice  = $par['startPrice'];
Add below this:

Code: Select all

            //verifying offer start Price
            if(!is_numeric($offer->startPrice)){
                throw new Exception (sprintf(_('Start Price must be a positive integer value.')),Error::BY_USER);
            }

            //verifying offer start Price
            if($offer->startPrice<=0){
                throw new Exception (sprintf(_('Start Price must be greater than 0.00.')),Error::BY_USER);
            }

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest