public function actionPayments() { $order_id = $_GET['order_id']; $product = new Product(); $count = $product->_get_cart_count($order_id); if ($count > 0) { $pid = Yii::app()->session['pid']; $order = new Orders(); $user = new User(); //CheckOut Order $columns = array("active" => '1'); Yii::app()->db->createCommand()->update("orders", $columns, "order_id = '{$order_id}' "); //News Order $max_order_id = $order->Get_status_last_order($pid); Yii::app()->session['order_id'] = $max_order_id; $payment = new Payment(); $data['product'] = $order->_get_list_order($order_id); $data['address'] = $user->Get_address($pid); $data['payment'] = $payment->Get_patment(); $data['transport'] = $order->get_price_transport($order_id); $this->render("//orders/payments", $data); } else { $this->render("//orders/basket_null"); } }
<tr> <td>#</td> <td>รูป</td> <td>ชื่อสินค้า</td> <td style="text-align: center;">ราคา</td> <td style="text-align: center;">จำนวน</td> <td style="text-align: right;">ราคารวม</td> </tr> </thead> <tbody> <?php $totalall = 0; $i = 1; $product_model = new Product(); $order = new Orders(); $transport = $order->get_price_transport($rs['order_id']); $product = $order->_get_list_order($rs['order_id']); foreach ($product as $products): $img_ttitle = $product_model->get_images_product_title($products['product_id']); if(!empty($img_ttitle)){ $img = "uploads/product_thumb/".$img_ttitle['images']; } else { $img = "images/No-image.jpg"; } ?> <tr> <td><?= $i++ ?></td> <td style=" width: 10%;"> <img src="<?php echo Yii::app()->baseUrl; ?>/<?php echo $img; ?>" class="img-resize img-thumbnail" width="100%"/> </td> <td><?= $products['product_name']; ?></td>