need help with View All function In products

Hello

I have a website and I want to add the view all function to the product page, but I don’t know how to do it

I circled the area i want to add the View all function to in this screen shot
http://imageshack.com/a/img540/1389/fc2f1t.jpg

please note that the website is responsive

here is the code for the product page:

[code]<?php require_once(‘panel/library.php’);

$catid=(int)$_GET[‘id’];
$thispage=isset($_GET[‘page’])?(int)$_GET[‘page’]:1;
$heading=’’;

$txtlqry=“id=$catid”;
$thiscategory=mysqli_fetch_assoc(mysqli_query($CONNECTION,“select * from categories where id=’{$catid}’”));

if ($thiscategory[‘parent’]==0){
$Subcategories=mysqli_query($CONNECTION,“select * from categories where parent=’{$catid}’ and visible=‘Y’ order by rank”);
}
else{
$main=mysqli_fetch_assoc(mysqli_query($CONNECTION,“select * from categories where id=’{$thiscategory[‘parent’]}’”));
$heading.=$main[‘name’];
}

$query = “select * from products where category=’$catid’ and visible=‘Y’ order by rank”;

//$heading.=" » {$thiscategory[‘name’]}";
$heading=$thiscategory[‘name’];

$per_page = 20;

$count = mysqli_num_rows(mysqli_query($CONNECTION,$query));
$allpages = ceil($count/$per_page);
$start = ($thispage-1)*$per_page;
$products=mysqli_query($CONNECTION,"$query limit $start,$per_page") or die(mysqli_error());
?><!doctype html>

<?php include('head.php');?>
<?php include('header.php');?> <?php /* $siblings=mysqli_query($CONNECTION,"select * from categories where parent='{$thiscategory['parent']}' and visible='Y' order by rank"); if (mysqli_num_rows($products)>0){ ?>

<?php echo preg_replace('/\w+\s/i', '${0}', $main['name'],floor(str_word_count($main['name'])/2));?>


<?php }*/?>

<?php echo preg_replace('/\w+\s/i', '${0}', $main['name'],floor(str_word_count($main['name'])/2));?>


<?php echo getUL('categories',0,'name',3, 'yes');?>

<?php echo preg_replace('/\w+\s/i', '${0}', $heading,floor(str_word_count($heading)/2));?>


<?php if (mysqli_num_rows($products)>0){?>
    <?php while ($product=mysqli_fetch_assoc($products)){$group_name="prods_group".$catid;?>
  • <?php include('small.php');?>
  • <?php }?>
<?php if ($allpages>1){?>
<?php //Pagination Numbers for($i=1; $i<=$allpages; $i++) { echo (($thispage==$i)?"$i ":"$i "); } ?>
<?php }} else {?>
Comming Soon
<?php }?>
<?php include('footer.php');?>
[/code]

need help plz ::slight_smile: :-X

Sponsor our Newsletter | Privacy Policy | Terms of Service