Beispiel #1
0
                                <option value="DESC">Descending</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <button type="submit" class="btn btn-default">
                                <span class="glyphicon glyphicon-sort" aria-hidden="true"></span>
                            </button>
                        </div>
                    </form>
                </div>

            </div><!-- /.col-lg-12 -->
        </div><!-- /.row -->

        <hr>

        <div class="row">
            <div class="col-lg-12">

                <?php 
foreach ($search_results as $product) {
    echo displayProduct($product, 'product col-lg-3 col-md-4 col-xs-6 thumb');
}
?>

            </div><!-- /.col-lg-12 -->
        </div><!-- /.row -->

<?php 
include_once 'footer.php';
Beispiel #2
0
<?php 
$products = array(array('product_name' => 'Product name #01', 'is_new' => true, 'is_sale' => false, 'is_hot' => false, 'productImageURL' => 'assets/images/products/106.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => true, 'is_hot' => false, 'productImageURL' => 'assets/images/products/107.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => false, 'is_hot' => true, 'productImageURL' => 'assets/images/products/108.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => false, 'is_hot' => true, 'productImageURL' => 'assets/images/products/110.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => true, 'is_hot' => false, 'productImageURL' => 'assets/images/products/106.jpg'), array('product_name' => 'Product name #01', 'is_new' => true, 'is_sale' => false, 'is_hot' => false, 'productImageURL' => 'assets/images/products/105.jpg'), array('product_name' => 'Product name #01', 'is_new' => true, 'is_sale' => false, 'is_hot' => false, 'productImageURL' => 'assets/images/products/107.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => true, 'is_hot' => false, 'productImageURL' => 'assets/images/products/108.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => false, 'is_hot' => true, 'productImageURL' => 'assets/images/products/106.jpg'), array('product_name' => 'Product name #01', 'is_new' => true, 'is_sale' => false, 'is_hot' => false, 'productImageURL' => 'assets/images/products/110.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => true, 'is_hot' => false, 'productImageURL' => 'assets/images/products/105.jpg'), array('product_name' => 'Product name #01', 'is_new' => false, 'is_sale' => false, 'is_hot' => true, 'productImageURL' => 'assets/images/products/108.jpg'));
?>

	
<div class="fashion-v6-featured">
	<?php 
$delay = 0;
?>
	<?php 
foreach ($products as $product) {
    ?>
		<div class="item category-product">
			<div class="products grid-v4 wow fadeInUp" data-wow-delay="<?php 
    echo (double) ($delay / 10);
    ?>
s">
				<?php 
    displayProduct($product['product_name'], $product['is_new'], $product['is_sale'], $product['is_hot'], $product['productImageURL']);
    ?>
			</div><!-- /.products -->			
		</div><!-- /.item -->
		<?php 
    $delay++;
    ?>
	<?php 
}
?>
</div><!-- /.fashion-featured -->

<!-- ============================================== NEW PRODUCTS-V3 : END ============================================== -->
Beispiel #3
0
            <?php 
include_once 'sidebar.php';
?>

            <div class="col-md-9">

                <?php 
echo getSliderPictures();
?>

                <div class="row">

                    <?php 
foreach ($last_products as $product) {
    echo displayProduct($product, 'product col-sm-4 col-lg-4 col-md-4');
}
?>

>>>>>>> dac3df1668e72fa28db142677cb31d923055eaac
                </div><!-- /.row -->

            </div><!-- col-md-9 -->

        </div><!-- /.row -->

<<<<<<< HEAD
    </div><!-- /.container -->

    <?php 
require_once 'footer.php';
Beispiel #4
0
                                <span class="glyphicon glyphicon-star-empty"></span>
                            </p>
                        </div>
                        <div class="btns clearfix">
                            <a class="btn btn-info pull-left" href="product.php?id=<?php 
    echo $product['id'];
    ?>
"><span class="glyphicon glyphicon-eye-open"></span> View</a>
                            <a class="btn btn-primary pull-right" href=""><span class="glyphicon glyphicon-shopping-cart"></span> Add to cart</a>
                        </div>
                    </div><!-- /.thumbnail -->
                </div><!-- /.product -->
                                    <?php 
}
?>



            </div><!-- /.col-md-3 -->
            <div class="col-md-9">
=======

                <?php 
foreach ($random_products as $product) {
    echo displayProduct($product);
}
?>

            </div><!-- /.col-md-3 -->
>>>>>>> dac3df1668e72fa28db142677cb31d923055eaac
Beispiel #5
0
    // example: product_id 333 will have a row with id='p333'
    echo "<tr id='p" . $row["product_id"] . "'>\n                <td>" . $row["product_name"] . "</td>\n                <td>" . $row["product_price"] . "</td>\n                <td>" . $count . "</td>\n                <td><input type='button' value='Remove'\n                    onclick='basket_remove(" . $row["product_id"] . ")'>\n                </td>\n            </tr>";
}
require '../dbconnect.php';
$conn = dbconnect();
$conn->autocommit(false);
$conn->begin_transaction();
foreach ($_SESSION['basket'] as $product_id => $count) {
    $sql = "SELECT *\n    FROM shopdb.Products\n    WHERE product_id=" . $product_id . ";";
    $result = $conn->query($sql);
    //this should only be true if the product id is not in the database
    if ($result->num_rows === 0) {
        die('unable to find product with id ' . $product_id . ' in the database');
    }
    $row = $result->fetch_assoc();
    displayProduct($row, $count);
}
$conn->commit();
//close database connection
$conn->close();
?>
</table>
<p id="responseText"></p>

<?php 
//if the user is logged in, place the order without the form
if (array_key_exists('customer_login', $_SESSION)) {
    echo "<a href='/order/place_express.php'><button>Place order</button></a>";
} else {
    echo "<a href='/order/'><button>Place order</button></a>";
}