Forums / Bug Reports / Advanced search from price = to price

Advanced search from price = to price

Locked

Views: 771

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
30 Mar 2010, 4:23 PM
#1
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Advanced search from price = to price

Just a small bug this one.....
On the advanced search page, if you put in a from price and a matching to price (e.g. from price = 10.00, to price = 10.00) you get an error saying 'Price To must be greater than or equal to Price From.'

The fix is to open this file:
includes/modules/pages/advanced_search_result/header.php

Locate this bit of code:

  if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) {
    if ($pfrom >= $pto) {
      $error = true;

      $messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM);
    }
  }

and change it to this:

  if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) {
    if ($pfrom > $pto) {
      $error = true;

      $messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM);
    }
  }

You're just changing the second IF statement