Commit 9eafc385 by tetiana yaremko

delivery update, single item page finished

parent 26787f2e
......@@ -23,8 +23,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = 'https://wbt-2-ty-272811.appspot.com/';
//$config['base_url'] = 'http://localhost/webapp/ci/';
//$config['base_url'] = 'https://wbt-2-ty-272811.appspot.com/';
$config['base_url'] = 'http://localhost/webapp/ci/';
/*
|--------------------------------------------------------------------------
......@@ -379,22 +379,22 @@ $config['encryption_key'] = 'femEDWTX$AQ@6HggkKn8RWGf!*ufK?KC';
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'memcached';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'localhost:11211';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 7200;
$config['sess_regenerate_destroy'] = FALSE;
//$config['sess_driver'] = 'database';
//$config['sess_driver'] = 'memcached';
//$config['sess_cookie_name'] = 'ci_session';
//$config['sess_expiration'] = 7200;
//$config['sess_save_path'] = 'ci_sessions';
//$config['sess_save_path'] = 'localhost:11211';
//$config['sess_match_ip'] = FALSE;
//$config['sess_time_to_update'] = 7200;
//$config['sess_regenerate_destroy'] = FALSE;
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 7200;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
......
......@@ -75,12 +75,12 @@ $query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => '104.199.82.156',
'username' => 'tetiana',
'password' => 'yaremko_tetiana',
// 'hostname' => 'localhost',
// 'username' => 'root',
// 'password' => '',
// 'hostname' => '104.199.82.156',
// 'username' => 'tetiana',
// 'password' => 'yaremko_tetiana',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'mydb',
'dbdriver' => 'mysqli',
'dbprefix' => '',
......
......@@ -18,6 +18,7 @@ class User extends CI_Controller
if($this->session->userdata("role_id")=='1') {
redirect('admin/index');
};
if(isset($_POST['update'])) {
$this->form_validation->set_rules('new_email', 'Email', 'required|valid_email',
......@@ -104,6 +105,41 @@ class User extends CI_Controller
return TRUE;
}
public function delivery_address()
{
if($this->session->userdata("role_id")=='1') {
redirect('admin/index');
};
$this->form_validation->set_rules('country', 'Country', 'required',
array('required' => 'Please, enter new country in order to update'));
$this->form_validation->set_rules('city', 'City', 'required',
array('required' => 'Please, enter new city in order to update'));
$this->form_validation->set_rules('street', 'Street', 'required',
array('required' => 'Please, enter new street in order to update'));
$this->form_validation->set_rules('zip', 'zip', 'required',
array('required' => 'Please, enter new zip in order to update'));
$this->form_validation->set_rules('building', 'Building', 'required',
array('required' => 'Please, enter new building in order to update'));
$this->form_validation->set_rules('phone', 'Phone', 'required',
array('required' => 'Please, enter new phone number in order to update'));
if ($this->form_validation->run()==true) {
$this->load->model('auth_model', 'auth');
$this->auth->updateDelivery();
$this->session->set_userdata($this->auth->get_data());
$this->session->set_flashdata("d_message", "<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
Your data has been updated!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
//redirect('user/delivery_address');
}
$this->load->view('delievery_address');
}
......
......@@ -85,10 +85,10 @@ class Home extends CI_Controller {
public function item($item_id) {
$this->load->model('Admin_model', 'admin');
$data=$this->admin->get_product($item_id);
$get_by_genre=$this->admin->get_product_by_genre($item_id);
$this->load->view('templates/header');
$this->load->view('item', array('data'=>$data));
$this->load->view('item', array('data'=>$data, 'get_by_genre'=>$get_by_genre));
$this->load->view('templates/footer');
}
......
<?php
function upload_file ()
{
// if (isset($_FILES['file'])) {
// $ci =& get_instance();
// $config['upload_path'] = $ci->config->item('upload_path');
//
// $config['allowed_types'] = 'gif|jpg|png|jpeg';
// $config['max_size'] = 4048;
// $file_name="image".time();
// $config['file_name']=$file_name;
// $config['encrypt_name'] = TRUE;
//
// $ci->upload->initialize($config);
// if ( ! $ci->upload->do_upload('file')) {
// $file_error = $ci->upload->display_errors();
// $ci->session->set_flashdata("file_error", "<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
// '$file_error' <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
// <span aria-hidden=\"true\">&times;</span></button></div>");
// }
// else {
// return $ci->config->item('upload_prefix') . $ci->upload->data('file_name');
// }
//
// }
}
......@@ -37,6 +37,7 @@
$allowOnly['1']['admin']['delete_item']=true;
$allowOnly['2']['user']['user_profile']=true;
$allowOnly['2']['user']['delivery_address']=true;
$allowOnly['2']['cart']['user_cart']=true;
......
......@@ -118,7 +118,7 @@ class Admin_model extends CI_Model
$output = '';
if($data->num_rows() > 0)
{
foreach($data->result_array() as $row)
foreach(array_reverse($data->result_array()) as $row)
{
$output .= '<div class="shop-item">
<div class="image">
......@@ -172,6 +172,20 @@ class Admin_model extends CI_Model
return $output;
}
public function get_product_by_genre($prod_id) {
$this->db->select('genre');
$this->db->from('product');
$this->db->where('id', $prod_id);
$query = $this->db->get();
$genre = $query->row();
$this->db->select('*');
$this->db->from('product');
$this->db->where('genre', $genre->genre);
$row = $this->db->get();
return $row->result();
}
}
......
......@@ -24,8 +24,12 @@ class Auth_model extends CI_Model {
'email' => $row[0]->email,
'name'=> $row[0]->name,
'surname'=> $row[0]->surname,
'country'=> $row[0]->name,
'street'=> $row[0]->name,
'country'=> $row[0]->country,
'city'=> $row[0]->city,
'street'=> $row[0]->street,
'zip'=> $row[0]->zip,
'building'=> $row[0]->building,
'phone'=> $row[0]->phone,
'is_active' =>$row[0]->is_active,
'role_id'=> $row[0]->role_id
);
......@@ -55,7 +59,46 @@ class Auth_model extends CI_Model {
return 2;
}
public function updateDelivery() {
$country = $this->security->xss_clean($this->input->post('country'));
$city = $this->security->xss_clean($this->input->post('city'));
$street = $this->security->xss_clean($this->input->post('street'));
$zip = $this->security->xss_clean($this->input->post('zip'));
$building = $this->security->xss_clean($this->input->post('building'));
$phone = $this->security->xss_clean($this->input->post('phone'));
$session_email = $this->session->userdata('email');
$user = $this->db->get_where('users', array('email' => $session_email));
if ($user) {
$this->db->query("UPDATE users set country='$country' where email='$session_email'");
$this->db->query("UPDATE users set city='$city' where email='$session_email'");
$this->db->query("UPDATE users set street='$street' where email='$session_email'");
$this->db->query("UPDATE users set zip='$zip' where email='$session_email'");
$this->db->query("UPDATE users set building='$building' where email='$session_email'");
$this->db->query("UPDATE users set phone='$phone' where email='$session_email'");
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $session_email);
$query = $this->db->get();
if ($query->num_rows() == 1) {
$row = $query->result();
$this->_data = array(
'email' => $row[0]->email,
'name'=> $row[0]->name,
'surname'=> $row[0]->surname,
'country'=> $row[0]->country,
'city'=> $row[0]->city,
'street'=> $row[0]->street,
'zip'=> $row[0]->zip,
'building'=> $row[0]->building,
'phone'=> $row[0]->phone,
'is_active' =>$row[0]->is_active,
'role_id'=> $row[0]->role_id
);
}
}
}
public function updateEmail()
{
......@@ -78,13 +121,16 @@ class Auth_model extends CI_Model {
$this->_data = array(
'email' => $row[0]->email,
'password' =>md5($row[0]->password),
'name' => $row[0]->name,
'surname' => $row[0]->surname,
'country' => $row[0]->name,
'street' => $row[0]->name,
'is_active' => $row[0]->is_active,
'role_id' => $row[0]->role_id
'name'=> $row[0]->name,
'surname'=> $row[0]->surname,
'country'=> $row[0]->country,
'city'=> $row[0]->city,
'street'=> $row[0]->street,
'zip'=> $row[0]->zip,
'building'=> $row[0]->building,
'phone'=> $row[0]->phone,
'is_active' =>$row[0]->is_active,
'role_id'=> $row[0]->role_id
);
}
}
......@@ -105,13 +151,16 @@ class Auth_model extends CI_Model {
$row = $query->result();
$this->_data = array(
'email' => $row[0]->email,
'password' =>md5($row[0]->password),
'name' => $row[0]->name,
'surname' => $row[0]->surname,
'country' => $row[0]->name,
'street' => $row[0]->name,
'is_active' => $row[0]->is_active,
'role_id' => $row[0]->role_id
'name'=> $row[0]->name,
'surname'=> $row[0]->surname,
'country'=> $row[0]->country,
'city'=> $row[0]->city,
'street'=> $row[0]->street,
'zip'=> $row[0]->zip,
'building'=> $row[0]->building,
'phone'=> $row[0]->phone,
'is_active' =>$row[0]->is_active,
'role_id'=> $row[0]->role_id
);
}
......
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href=" <?php echo base_url();?>asset/css/register_style.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.update-form {
width: 43%;
}
.alert-m {
width: 43%;
}
.update-form h3 {
font-weight: bold;
}
.password-update h3 {
font-weight: bold;
}
.password-update {
border-top: 1px solid #ccc;
}
.password-update h3 {
padding-top: 30px;
}
.password-update .button{
float: right;
}
.update-form .form-group input {
width: 70%;
font-size: 1.1em;
line-height: 1.6;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
}
</style>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="<?php echo base_url(); ?>index.php/user/user_profile">Your details</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
<div class="update-form">
<h3>Delivery address</h3>
<?php $d_message = $this->session->flashdata("d_message")?>
<?php echo $d_message; ?>
<?php echo form_open('user/delivery_address'); ?>
<table>
<tbody>
<tr>
<td>
<label for="country">Country</label>
</td>
<?php $error =form_error("country", "<small class='text-danger'>", '</small>');?>
<td> <input name="country" id="country" type="text" value="<?php echo $this->session->userdata('country'); ?>"/>
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="city">City</label>
</td>
<?php $error =form_error("city", "<small class='text-danger'>", '</small>');?>
<td> <input name="city" id="city" type="text" value="<?php echo $this->session->userdata('city'); ?>"/>
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="street">Street</label>
</td>
<?php $error =form_error("street", "<small class='text-danger'>", '</small>');?>
<td> <input name="street" id="street" type="text" value="<?php echo $this->session->userdata('street'); ?>"/>
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="building">Building</label>
</td>
<?php $error =form_error("building", "<small class='text-danger'>", '</small>');?>
<td> <input name="building" id="building" type="text" value="<?php echo $this->session->userdata('building'); ?>"/>
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="zip">ZIP</label>
</td>
<?php $error =form_error("zip", "<small class='text-danger'>", '</small>');?>
<td> <input name="zip" id="zip" type="text" value="<?php echo $this->session->userdata('zip'); ?>"/>
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="phone">Phone</label>
</td>
<?php $error =form_error("phone", "<small class='text-danger'>", '</small>');?>
<td> <input name="phone" id="phone" type="text" value="<?php echo $this->session->userdata('phone'); ?>"/>
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="update-button">
<button class="button " type="submit" >Update</button>
</div>
</form>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
......@@ -13,7 +13,7 @@
</head>
<style>
.item-container {
color: color: #3a3a3a;;
color: color: #3a3a3a;
}
.item-container .row .col:nth-child(2) div:first-of-type {
border-bottom: 5px solid #adb5bd;
......@@ -23,19 +23,50 @@
}
.item-container h3{
text-transform: uppercase;
}
.cart-btn {
position: static !important;
transform: translateX(0) !important;
font-size: 1.3rem !important;
background-color: #2D473A !important;
color: whitesmoke !important;
font-weight: bold !important;
padding: 10px 20px !important;
box-shadow: 0 1px 5px rgba(0,0,0,.53);
}
.cart-btn:hover {
background-color: #AE860D !important;
}
.pairings{
background: rgb(63,48,5);
background: linear-gradient(283deg, rgba(63,48,5,1) 0%, rgba(105,81,8,1) 35%, rgba(238,187,33,1) 100%);
}
.pairings h4 {
color: white;
text-transform: uppercase;
font-weight: bold;
}
.pairings span {
color: whitesmoke;
}
.pairings .row .col .title-span {
font-weight:bold;
font-size: 1.2rem;
}
.pair-col {
cursor: pointer;
transition: all 0.1s linear;
}
.pair-col:hover {
transform: translate(0px, -5px)
}
</style>
<body>
<div class="container-fluid item-container" style="margin-top: 145px; max-width:1405px">
<div class="container-fluid item-container mb-2" style="margin-top: 145px; max-width:1405px">
<div class="row row-cols-1 row-cols-md-2 ">
<div class="col d-flex justify-content-center ">
<img class="img-thumbnail" src="<?php echo base_url("uploads/".$data->image) ?>"/>
<a href=""> <img class="img-thumbnail" style="border:3px solid #AE860D" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image600/.fQ74yF0W/SharedImage-94323.jpg?t=6c8ee880a9a1745d7770"/></a>
</div>
<div class="col pt-md-5">
......@@ -46,11 +77,74 @@
<div class="pt-3 bolder price-color">
<h2><?php echo $data->price?></h2>
</div>
<div class="d-flex my-4">
<button class=" btn cart-btn big-btn rounded-0" id="<?php echo $data->id;?>" data-butnid="<?php echo $data->id;?>" data-productid="<?php echo $data->id;?>" data-productartist="<?php echo $data->artist;?>"
data-producttitle="<?php echo $data->title;?>" data-productprice="<?php echo $data->price;?>" data-productimage="<?php echo $data->image;?>" value="add to cart" >
<i class="fa fa-shopping-cart"></i>
Add to cart
</button>
</div>
<div style="border: 2px solid black !important;" class="border d-flex flex-column align-items-center justify-content-center py-2 mb-4">
<p style="font-size: 1.2rem" class="m-0">Purchase now and we’ll ship from our warehouse in 3-5 business days.</p>
</div>
</div>
</div>
</div>
<div class="container-fluid pairings mt-5">
<h4 class="py-5 text-center">Perfect Pairings</h4>
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 justify-content-center">
<?php if(count($get_by_genre)): ?>
<?php $i=0; ?>
<?php foreach (array_reverse($get_by_genre) as $item) { ?>
<?php if($i<4 && $item->id != $data->id) { ?>
<?php if($item->feature=='exclusive') { ?>
<div class="pair-col col d-flex flex-column justify-content-center align-items-center mb-5">
<a href="<?php echo base_url(); ?>index.php/home/item/<?php echo $item->id; ?>">
<img class="img-thumbnail" style="max-height: 20rem" src="<?php echo $item->image; ?>"/></a>
<span class="text-uppercase title-span"><?php echo $item->artist; ?></span>
<span class="text-center" style="font-size: .9rem"><?php echo $item->title; ?></span>
<span style="font-weight: bold; font-size: 1.1rem"><i><?php echo $item->price; ?></i></span>
</div>
<?php } ?>
<?php } ?>
<?php $i++; ?>
<?php } ?>
<?php endif; ?>
</div>
</div>
<div class="container my-4">
<div class="row">
<div class="col row-cols-sm-1 row-cols-md-2 ">
<div class="d-flex justify-content-center align-items-center">
<img style="height: 3rem" src="https://cdn.shopify.com/s/files/1/0069/3465/9162/files/colored-record_200x.png?v=1563963072">
</div>
<p class="text-center" style="font-weight: bold; font-size:1.1rem">Join the club for more perks.</p>
<p class="text-center">Vinyl Me, Please members receive our exclusive Records of the Month and special access to other limited titles. Starting at $25/month. </p>
</div>
<div class="col ">
<div class="d-flex justify-content-center align-items-center">
<img style="height: 3rem" src="https://cdn.shopify.com/s/files/1/0069/3465/9162/files/peace_200x.png?v=1563963246">
</div>
<p class="text-center" style="font-weight: bold; font-size:1.1rem">We’ll make it right.</p>
<p class="text-center">Should the unspeakable happen and you receive a damaged record, we’ll do everything in our power to address it. Learn more about our Damage + Return policy here </p>
</div>
</div>
</div>
<!-- Optional JavaScript -->
......@@ -58,5 +152,15 @@
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script type="text/javascript">
baseUrl = '<?php echo base_url(); ?>';
</script>
<script src="<?php echo base_url(); ?>asset/js/scrypt.js"></script>
<script src="<?php echo base_url(); ?>asset/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</body>
</html>
......@@ -181,21 +181,21 @@
<tr>
<td>
<label>
<input type="radio" checked="checked">Email you about the latest news
<input type="checkbox" class="mr-2" >Email you about the latest news
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" >Email you about discounts and promotions
<input type="checkbox" class="mr-2" >Email you about discounts and promotions
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" >Only Email you regarding your orders
<input type="checkbox" class="mr-2" >Only Email you regarding your orders
</label>
</td>
</tr>
......
......@@ -58,16 +58,16 @@
<div class="col-12 col-md-6 col-lg-3">
<ul>
<li>Categories</li>
<li><a href="">Home</a></li>
<li><a>Bank Holiday Sale 2020</a></li>
<li><a href="<?php echo base_url(); ?>index.php/home/products">Home</a></li>
<li><a href="#">Bank Holiday Sale 2020</a></li>
<li>Pre-Orders</li>
<li><a>Deal of the Day</a></li>
<li><a>Signed</a></li>
<li><a>Genres</a></li>
<li><a>Coloured Vynil</a></li>
<li><a>Limited Edition</a></li>
<li><a>Redeem</a></li>
<li><a>SOV Messenger</a></li>
<li><a href="<?php echo base_url(); ?>index.php/home/all_products">Genres</a></li>
<li><a href="#">Coloured Vynil</a></li>
<li><a href="#"> Limited Edition</a></li>
<li><a href="#">Redeem</a></li>
<li><a href="#">SOV Messenger</a></li>
</ul>
</div>
<div class="col-12 col-md-6 col-lg-4">
......
......@@ -91,7 +91,8 @@
<div class="shop-items">
<?php if(count($data)): ?>
<?php $i=0; ?>
<?php foreach ($data as $item) { ?>
<?php foreach (array_reverse($data) as $item) { ?>
<?php if($i<12) { ?>
<?php if($item->feature=='recommended') { ?>
<div class="shop-item">
<div class="image">
......@@ -125,7 +126,9 @@
</div>
</div>
<?php } ?>
<?php $i++; ?>
<?php } ?>
<?php } ?>
<?php endif; ?>
......@@ -143,13 +146,14 @@
<div class="shop-items">
<?php if(count($data)): ?>
<?php $i=0; ?>
<?php foreach ($data as $item) { ?>
<?php foreach (array_reverse($data) as $item) { ?>
<?php if($i<12) { ?>
<?php if($item->feature=='exclusive') { ?>
<div class="shop-item">
<div class="image">
<span class="badge rounded-0">Exclusive</span>
<a href="<?php echo base_url(); ?>index.php/items/item1">
<img class="shop-item-image" src="<?php echo base_url("uploads/".$item->image) ?>" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
<a href="<?php echo base_url(); ?>index.php/home/item/<?php echo $item->id; ?>">
<img class="shop-item-image" src="<?php echo $item->image ?>" alt="<?php echo $item->title;?>"/>
</a>
<?php if($item->status=='sold'): ?>
......@@ -179,8 +183,9 @@
</div>
</div>
<?php } ?>
<?php } ?>
<?php $i++; ?>
<?php } ?>
<?php endif; ?>
</div>
......
......@@ -61,7 +61,7 @@
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="<?php echo base_url(); ?>index.php/user/user_profile">Your details</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="<?php echo base_url(); ?>index.php/user/delivery_address">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
......
......@@ -104,6 +104,7 @@ $(document).ready(function() {
};
$('.cart-link').click(function () {
load_cart_data();
showCart();
})
$('.close').click(function () {
......@@ -112,7 +113,7 @@ $(document).ready(function() {
})
load_cart_data();
function load_cart_data()
{
$.ajax({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment