You are here:  » Prices external one result


Prices external one result

Submitted by henk on Fri, 2012-05-25 06:50 in

Hello David,

Is it possible to have the result in prices external only with one result, the cheapest on :)

Thx
Henk

Submitted by support on Fri, 2012-05-25 07:58

Hello Henk,

Sure, in pricesExternal.php you'll find the following code at line 62:

    $sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE normalised_name = '".database_safe($q)."' ORDER BY price";

...simply REPLACE with:

    $sql = "SELECT * FROM `".$config_databaseTablePrefix."products` WHERE normalised_name = '".database_safe($q)."' ORDER BY price LIMIT 1";

Cheers,
David.
--
PriceTapestry.com