Subversion Repositories SmartDukaan

Rev

Rev 13901 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="container">
        <div class="searchbar">
                <form class="navbar-form" role="search" method="GET" name="search">
                <div class="input-group col-xs-12 text-right">
                    <input type="text" class="form-control" placeholder="Search for items" name="q" id="srch-term">
                    <div class="input-group-btn w25px">
                        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
                    </div>
                </div>
        </form>
        </div>
        <div class="searchresults">
                <?php if(!empty($result)):?>
                <div class="searchterm">
                        <?php echo $q;?> (<?php echo sizeof($result['Solr']);?> results)
                </div>
                <?php foreach ($result['Solr'] as $key => $product):?>
                <a href="/store_products/view/<?php echo $product['id'];?>">
                        <div class="card row">
                                <div class="col-xs-4 productthumb" data-id="<?php echo $product['id'];?>">
                                        <?php if(!empty($product['thumbnail'])):?>
                                        <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $product['thumbnail'];?>&h=100" />
                                <?php else:?>
                                        <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $base_url;?>img/noimage.png&h=80" alt="<?php echo $product['title'];?>"/>
                                <?php endif;?>
                        </div>
                        <div class="col-xs-6 productdetails" data-id="<?php echo $product['id'];?>">
                                <h5 class="producttitle" ><?php echo $product['title'];?></h5>
                                <div class="product_prices">
                                  <?php if(isset($product['available_price']) && !empty($product['available_price'])):?>
                                        <div><span class="rupee"></span><span class="product_price"><?php echo $product['available_price'];?></span></div>
                                      <?php endif;?>
                                  <?php if(isset($product['cashback']) && !empty($product['cashback'])):?>
                                        <div><span class="cashbacklabel">Cashback</span><span class="cashbackrupee"></span> <span class="cashback"><?php echo $product['cashback'];?></span></div>
                                  <?php endif;?>
                                </div> 
                                <div class="product_short_description <?php if(!isset($product['tagline'])):?>hidden<?php endif;?>"><?php echo $product['tagline'];?></div>
                                </div>
                        </div>
                </a>
                <?php endforeach;?>
                <?php endif;?>
        </div>
</div>