You are here:  » Featured products frontpage


Featured products frontpage

Submitted by wesse249 on Wed, 2015-10-21 08:03 in

Hello,

How can i place featured product the front page. Multiple row like the page when you search for a product.

Gr JR

Submitted by support on Wed, 2015-10-21 08:42

Hello Jan,

Since the new Responsive HTML template was introduced in 14/06A Featured Products are displayed in columns using Foundation's block-grid- class. Look for the following around line 5...

    <ul class="small-block-grid-1 medium-block-grid-4">

Foundation's small/medium/large classes inherit upwards, so the above means 4 columns on anything medium or above resolution, but you could, for example set-up 1, 2 or 4 columns depending on resolution as follows;

    <ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4">

If you're running an earlier distribution with the table based Featured Products display, check out this thread for creating the output on multiple rows...

Cheers,
David.
--
PriceTapestry.com

Submitted by keshavkshirsagar on Fri, 2015-10-23 10:40

Hello Sir

Featured Products on home page

Merchant is defer from price

Its showing minimum price But Showing different Merchant

Submitted by support on Fri, 2015-10-23 11:15

Hi,

Rather than add `merchant` field to the main Featured Products SELECT query (which is actually a summary query) instead it should be re-queried for each result in order to get the merchant associated with the cheapest price. To do this, look for the following code within your Featured Products selection code (beginning at line 39 in distribution index.php)

    foreach($featured["products"] as $k => $product)
    {
      $featured["products"][$k]["productHREF"] = tapestry_productHREF($product);
      $featured["products"][$k]["reviewHREF"] = tapestry_reviewHREF($product);
    }

...and REPLACE with:

    foreach($featured["products"] as $k => $product)
    {
      $sql = "SELECT merchant FROM `".$config_databaseTablePrefix."products` WHERE name='".database_safe($product["name"])."' ORDER BY price LIMIT 1";
      database_querySelect($sql,$rows);
      $featured["products"][$k]["merchant"] = $rows[0]["merchant"];
      $featured["products"][$k]["productHREF"] = tapestry_productHREF($product);
      $featured["products"][$k]["reviewHREF"] = tapestry_reviewHREF($product);
    }

Cheers,
David.
--
PriceTapestry.com