load_cart_list();
                    load_box_cart();
                });
    }
</script>

<?php if ($count > 0) { ?>

    <table width="100%" class="table table-hover" id="font-18">
        <tbody>
            <?php
            $product_model = new Product();
            $totalall = 0;
            $i = 1;
            foreach ($product as $products):
                $img_title = $product_model->get_images_product_title($products['product_id']);
                if (!empty($img_title)) {
                    $img = "uploads/product_thumb/" . $img_title['images'];
                } else {
                    $img = "images/No_image_available.jpg";
                }
                $product_price = $products['product_price'];
                ?>
                <tr id="tr_b" style=" color: #000;">
                    <td id="td_b">
                        <img src="<?php echo Yii::app()->baseUrl; ?>/<?php echo $img; ?>" style=" max-width: 80px;"/>
                    </td>
                    <td>
                        <b>สินค้า</b> <?= $products['product_name']; ?><br/>
                        <b>ราคา</b> <?= number_format($products['product_price']); ?> <b>บาท/หน่วย</b><br/>
                        <b>จำนวน</b> <select id="num" onchange="edit_num('<?= $products['id'] ?>', this.value, '<?= $product_price ?>');"
Example #2
0
<?php
$this->breadcrumbs = array(
    'ค้นหาสินค้า',
);
?>
<br/>
<ol class="dribbbles group" style="padding-left: 0px;">
    <?php
    $product_model = new Product();
    $web = new Configweb_model();
    $i = 0;
    foreach ($product as $last):
        $i++;
        $img_short = $product_model->get_images_product_title($last['product_id']);
        if (!empty($img_short['images'])) {
            $img = "uploads/product_thumb/" . $img_short['images'];
        } else {
            $img = "images/No_image_available.jpg";
        }
        $link = Yii::app()->createUrl('frontend/product/detail/id/' . $web->url_encode($last['product_id']));
        ?>
        <li id="screenshot-<?php echo $i; ?>" class="col-lg-4 col-md-4 col-sm-6 col-xs-6" style="text-align:center; margin-bottom:15px;">
            <div class="dribbble" id="box_list_product">
                <div class="dribbble-shot">
                    <div class="dribbble-img">
                        <a class="dribbble-link" href="/shots/2166663-Retinabbble-Chrome-extension-for-dribbble">
                            <div data-picture data-alt="Retinabbble - Chrome extension for dribbble">
                                <img src="<?php echo Yii::app()->baseUrl; ?>/<?php echo $img; ?>"/>
                            </div>
                        </a>
                        <a class="dribbble-over hvr-pop" href="<?php echo $link ?>" id="hover-box-product">    
Example #3
0
                </button></a>
        </div>
    </div><br/>
<?php endif; ?>

<div class="panel panel-default">
    <div class="panel-heading">
        <font id="font-22">สินค้ามาใหม่</font>
    </div>
    <ol class="dribbbles group" style="padding-left: 0px; margin-top:10px;">
        <?php
        $product_model = new Product();
        $i = 0;
        foreach ($last_product as $last):
            $i++;
            $img_title = $product_model->get_images_product_title($last['product_id']);
            if (!empty($img_title)) {
                $img = "uploads/product_thumb/" . $img_title['images'];
            } else {
                $img = "images/No_image_available.jpg";
            }

            $link = Yii::app()->createUrl('frontend/product/detail/id/' . $config->url_encode($last['product_id']));
            ?>
            <?php if ($i == "1") { ?>
                <li id="screenshot-<?php echo $i; ?>" class="col-lg-6 col-md-6 col-sm-12" style="text-align:center; margin-bottom:15px;">
                    <div class="dribbble" id="box_list_product">
                        <div class="dribbble-shot">
                            <div class="dribbble-img">
                                <a class="dribbble-link" href="#">
                                    <div data-picture data-alt="Retinabbble - Chrome extension for dribbble">
                    <?php $price = $product['product_price']; ?>
                </div>
            </div>

            <center>
                <font style="color:#000; font-size: 24px;">
                ราคา
                <span class="badge btn-danger" style="font-size: 24px;"><?= number_format($product['product_price']) ?>.-</span>  บาท
                </font>
            </center>
        </div>

        <div class="col-lg-8 col-md-12 col-xs-12" style=" padding-top: 10px;">
            <?php
            $product_model = new Product();
            $img_title = $product_model->get_images_product_title($product['product_id']);
            if (!empty($img_title)) {
                $img = "uploads/product_thumb/" . $img_title['images'];
            } else {
                $img = "images/No_image_available.jpg";
            }
            ?>
            <center>
                <img src="<?= Yii::app()->baseUrl ?>/<?= $img; ?>" class="img-responsive" alt="Responsive image" id="img-cart"/>
            </center>     
        </div>
    </div>
    <br/>

    <div class=" row">
        <div class=" col-lg-12">
Example #5
0
         <th></th>
         <th>สินค้า</th>
         <th style="text-align: center;">จำนวน</th>
         <th style="text-align: right;">ราคา/ชิ้น</th>
         <th style="text-align: right;">ราคารวม</th>
     </tr>
 </thead>
 <tbody>
     <?php
     $i = 0;
     $product = new Product();
     $sum_price = 0;
     foreach ($basket as $rs):
         $i++;
         $sum_price = $sum_price + $rs['product_price_sum'];
         $img_short = $product->get_images_product_title($rs['product_id']);
         if(!empty($img_short)){
             $img = "uploads/product_thumb/".$img_short['images'];
         } else {
             $img = "images/No_image_available.jpg";
         }
         ?>
         <tr>
             <td><?php echo $i; ?></td>
             <td style="width: 10%;">
                 <img src="<?php echo Yii::app()->baseUrl; ?>/<?php echo $img ?>" class="img-thumbnail img-responsive" style="max-width:80px;"/>
             </td>
             <td><?php echo $rs['product_name']; ?></td>
             <td style="text-align: center;"><?php echo $rs['product_num']; ?></td>
             <td style="text-align: right; color: #ffcc00;"><?php echo number_format($rs['product_price'], 2); ?></td>
             <td style="text-align: right; color: #ff0000; background: #eeeeed;"><?php echo number_format($rs['product_price_sum'], 2); ?></td>