%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_1ec2d7c2/apps/models/ |
Upload File : |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Cart_model extends CI_Model {
public function __construct()
{
//$this->load->database();
}
function update_cart($rowid, $qty, $price, $amount,$discount_price=0,$discount_deposite=0) {
$data = array(
'rowid' => $rowid,
'qty' => $qty,
'price' => $price,
'discount_price' => $discount_price,
'discount_deposite' => $discount_deposite,
'amount' => $amount
);
$this->cart->update($data);
}
function getNewCartId(){
$this->db->select("MAX(id) as cart_id");
$this->db->from('bh_temp_cart');
$this->db->order_by("id","asc");
$this->db->limit(1);
$query=$this->db->get();
$data = $query->row_array();
return ($data['cart_id'] + 1);
}
function CheckTemCartId($temp_cartid){
$this->db->select("*");
$this->db->from('bh_temp_cart');
$this->db->where("id",$temp_cartid);
$this->db->order_by("id","asc");
$this->db->limit(1);
$query=$this->db->get();
$data = $query->row_array();
return (($data['id'] > 0)?'1':'0');
}
}