Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tetiana yaremko
/
web-app-group2
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
df9864ad
authored
Apr 23, 2020
by
tetiana yaremko
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ready to deploy
parent
da1eee61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
application/controllers/Cart.php
application/controllers/Cart.php
View file @
df9864ad
...
...
@@ -13,6 +13,7 @@ class Cart extends CI_Controller
if
(
$this
->
session
->
userdata
(
"logged_in"
))
{
$this
->
cmodel
->
add_to_user_cart
(
$this
->
session
->
userdata
(
'email'
),
$prod_id
);
//echo '<pre>'; echo $this->session->userdata('email'); echo $prod_id; echo '</pre>';
}
// $this->cmodel->add_to_cart($prod_id); ///changed
$data
=
$this
->
cmodel
->
get_prod_data
(
$prod_id
);
...
...
@@ -24,7 +25,7 @@ class Cart extends CI_Controller
'title'
=>
$data
->
title
,
'image'
=>
$data
->
image
,
);
$this
->
cart
->
insert
(
$
data
);
$this
->
cart
->
insert
(
$
cart
);
...
...
@@ -54,6 +55,7 @@ class Cart extends CI_Controller
);
array_push
(
$new_cart
,
$cart
);
}
$this
->
cart
->
destroy
();
$this
->
cart
->
insert
(
$new_cart
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment