Submitted by paullas on Sat, 2012-05-12 21:17 in Price Tapestry
hi david.
i have sent a few emails this week but not sure if you getting them. but can you post the code for the featured items so i can display from a certain category.
My apologies I checked and don't seem to have received or missed any emails from you. The code is straight forward; in index.php the admin entered Featured Products are selected by the following code at line 32:
$sql = "SELECT * FROM `".$config_databaseTablePrefix."featured` ORDER BY sequence";
So to select, say, 3 random products from a specified category, REPLACE that line with:
$sql = "SELECT name,1 AS sequence FROM `".$config_databaseTablePrefix."products` WHERE category='Category Name' ORDER BY RAND()";
Hello Paul,
My apologies I checked and don't seem to have received or missed any emails from you. The code is straight forward; in index.php the admin entered Featured Products are selected by the following code at line 32:
$sql = "SELECT * FROM `".$config_databaseTablePrefix."featured` ORDER BY sequence";
So to select, say, 3 random products from a specified category, REPLACE that line with:
$sql = "SELECT name,1 AS sequence FROM `".$config_databaseTablePrefix."products` WHERE category='Category Name' ORDER BY RAND()";
Hope this helps!
Cheers,
David.
--
PriceTapestry.com