标签面板不起作用 [英] Tab panel not working

查看:96
本文介绍了标签面板不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了产品展示页面。左侧面板i显示子类别的产品,右侧面板显示所选子类别的对应产品。

现在,在右侧面板中显示所选产品和未选择的子类别的所有产品。 />


所以,我不想显示所有面板都打开(在右侧面板上) - 只有当我点击相应的子类别(在左侧面板上)时?



我尝试过:



I created product shows page. There was left side panel i show sub category of pruducts and right side panel show correspond product of selected sub category.
Now, In right side panel showsed all product of selected and not selected sub category.

So, i don't want to show all panels open (on the right side panel) - only when i click the corresponding sub category (on the left side panel)?

What I have tried:

<div class="tabList">
	<div class="tabList-list-wrap">
		<h3 class="widget-title">All Categories</h3>
		<ul class="tabList-list">
			<?php 
				$cate_id = 'Cookware';
				$query=mysqli_query($conn,"SELECT * FROM category WHERE cate='$cate_id'");
                if(mysqli_num_rows($query) > 0){
					while($row = mysqli_fetch_assoc($query)){
						?>
							<li data-tab-select="<?php echo $row['Sub-Cate'];?>" class="tabList-list-item"><?php echo $row['Sub-Cate'];?></li>
						<?php 
                    }
                }
            ?>
		</ul>  
	</div>
	<div class="tabList-content">
		<?php 
            $cate_id = 'Cookware';
			$query=mysqli_query($conn,"SELECT * FROM category WHERE cate='$cate_id'");
			if(mysqli_num_rows($query) > 0){
				while($row = mysqli_fetch_assoc($query)){
					?>
						<div data-tab-item="<?php echo $row['Sub-Cate'];?>" class="tabList-tab">
						<header><h2 class="h1"><?php echo $row['Sub-Cate'];?></h2></header>
						<div class="row">
							<?php
							if(isset($row['Sub-Cate'])){
								$subcate= $row['Sub-Cate'];
								$query1=mysqli_query($conn,"select * from product where category='cookware' and sub_cate='$subcate' and status='Y'");
								if(mysqli_num_rows($query1) > 0){
									while($row1 = mysqli_fetch_assoc($query1)){
										?>
										<div class="col-md-4">
											<div class="product first">
												<div class="product-outer">
													<div class="product-coockware">  	
														<h3 class="cookware-name"><?php echo htmlentities($row1['product_name']);?></h3>
														<div class="product-thumbnail">
															<figure>		
																<a href="product-detail.php?id=<?php echo htmlentities($row1['id']);?>" class="new-gri">
																	<div class="grid-img">
																		<img src="admin_panel/product_images/<?php echo htmlentities($row1['product_image1']);?>" class="img-responsive" alt="">
																	</div>
																	<div class="grid-img">
																		<img src="admin_panel/product_images/<?php echo htmlentities($row1['product_image1']);?>" class="img-responsive" alt="">
																	</div>			
																</a>		
															</figure>
														</div>		
														<div class="price-add-to-cart">
															<span class="price">
																<span class="cookware-price">
																	<span class="amount"> Rs.<?php echo htmlentities($row1['price']);?></span>
																	<!--<del><span class="amount">Rs.3500.00</span></del>-->
																	<span class="amount"> </span>
																</span>
															</span>
															<span class="pull-right">
																<a rel="nofollow" href="#" class="button add_to_cart_button">Add to cart</a>
															</span>
														</div><!-- /.price-add-to-cart -->
														<div class="hover-area"></div>
													</div><!-- /.product-inner -->
												</div><!-- /.product-outer -->
											</div><!-- /.product -->
										</div>
										<?php 
									} 
								}else{
									?>
										<h4>No Product Found...</h4>
									<?php
								}
							}
							?>
						</div>
						</div>
					<?php 
                }
            }			
        ?>			
	</div>
</div>

推荐答案

cate_id = ' Cookware';
cate_id = 'Cookware';


query = mysqli_query(
query=mysqli_query(


conn, SELECT * FROM category WHERE cate ='
conn,"SELECT * FROM category WHERE cate='


这篇关于标签面板不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆