Shopping Cart with Checkout Using CodeIgniter
This shopping cart is using CodeIgniter framework that allows you to add/update/delete a product from the cart. I am using the database in my previous post as a fixed on the existing shopping cart I found in the internet.
This code is totally different from the code at “How to Build Shopping Cart w/ Checkout in PHP”. It has a cleaner code, secured and most importantly easy to understand.
Shopping cart with checkout using CodeIgniter is part of the tutorial that I am currently working. I will explain this one by one on how I created this code in the next few days.
It's so easy to create a cart using CodeIgniter. Here's an example code:
- public function add()
- {
- $this->load->model('Cart_model');
- 'id' => $this->input->post('id'),
- 'name' => $this->input->post('name'),
- 'price' => $this->input->post('price'),
- 'qty' => 1
- );
- $this->cart->insert($insert_room);
- redirect('cart');
- }
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
Need the db-file
The database can be found on
Open application/config
it dont work
Add new comment
- Add new comment
- 4162 views