WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000266WeBidAuctionspublic2011-04-21 16:392012-12-13 16:28
ReporterBox Lot 
Assigned To 
PriorityimmediateSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.0.2 
Target VersionFixed in Version1.1.0 
Summary0000266: Edit Active Data Check error when Commas in values Buy Now, Reserve (Solution attached)
DescriptionThere is a http://www.webidsupport.com/forums/showthread.php?3602-Buy-now-bug" [^" title="]posting outside the project">]posting outside the project on this which outlines the scenario. Presumably it will happen also with the reserve price based on the data check.

Here is the fix.

In /includes/datacheck.inc.php

On/around line 199 find:
    if ($with_reserve == 'yes' && $reserve_price <= $minimum_bid)
    {
        return '5045';
    }

    if ($buy_now == 'yes' && $buy_now_only == 'n')
    {
        if (($with_reserve == 'yes' && $buy_now_price <= $reserve_price) || $buy_now_price <= $minimum_bid)
        {
            return '5046';
        }
    }
Replace with:
    if ($with_reserve == 'yes' && str_replace(",", "", $reserve_price) <= str_replace(",", "", $minimum_bid))
    {
        return '5045';
    }

    if ($buy_now == 'yes' && $buy_now_only == 'n')
    {
        if (($with_reserve == 'yes' && str_replace(",", "", $buy_now_price) <= str_replace(",", "", $reserve_price)) || str_replace(",", "", $buy_now_price) <= str_replace(",", "", $minimum_bid))
        {
            return '5046';
        }
    }
For those Countries using periods instead of commas you can edit this:
str_replace(",", "",
to this:
str_replace(".", "",
TagsNo tags attached.
import_id268
Thread
Attached Files

- Relationships

-  Notes
(0000675)
laura458 (reporter)
2011-04-22 01:35
edited on: 1970-01-01 00:00

Which file?
(0000676)
Box Lot (reporter)
2011-04-22 01:47
edited on: 1970-01-01 00:00

Lol, I edited it away.

/includes/datacheck.inc.php
(0000677)
laura458 (reporter)
2011-04-22 02:34
edited on: 1970-01-01 00:00

Box Lot wrote

Lol, I edited it away.

/includes/datacheck.inc.php


OMG! LOL! Well, at least we got a chuckle from it. TY for the update too! :)
(0000679)
laura458 (reporter)
2011-04-22 15:25
edited on: 1970-01-01 00:00

Stupid question, but does this part:
For those Countries using periods instead of commas you can edit this:
str_replace(".", "",

make it so auctions with an amount of $1,500 come out as:
$1,500.00? Or am I going to get $1,500,00 or $1.500.00
Asking because there is a comma and a period for my currency type.

or do I use this one?
str_replace(",", "",

Sorry, it's another blond moment, need to ask
(0000701)
andrewfr (reporter)
2011-04-28 04:30
edited on: 1970-01-01 00:00

Many thanks!

Best,

Andrew

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 268
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2011-04-21 16:39
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2012-12-13 16:28


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker