You are here:  » Most view product and featured procudc at the same time

Support Forum



Most view product and featured procudc at the same time

Submitted by Syn on Thu, 2012-11-15 20:05 in

Hello, I would like to know how to display it in a vertical column with 5 most view product, I followed this method http://www.pricetapestry.com/node/4584 but the problem is that with this the method featured product is no longer displayed
I wish I could see both at once

thank you for your response

cordially

Submitted by support on Fri, 2012-11-16 10:21

Hi Syn,

If you follow your new code (the modified original Featured Products code) with:

  unset($featured);

...and then follow that with the original Featured Products code from index.php that will restore Featured Products in addition to your most viewed.

The section you need to restore after the unset() line is from the original SQL:

  $sql = "SELECT * FROM `".$config_databaseTablePrefix."featured` ORDER BY sequence";

...down to the call to html/featured.php:

  if (isset($featured)) require("html/featured.php");

So your index.php will now have 2 instances of if (isset($featured)) require("html/featured.php"); - the first displying your most viewed; and the second displaying the normal Featured Products.

If you're note sure of course, drop me an email with your index.php and I'll merge the code for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by Syn on Fri, 2012-11-16 14:19

Ok i send you me index.php :)