CodeIgniter from Scratch: Shopping Cart
videos

CodeIgniter from Scratch: Shopping Cart

Tutorial Details
  • Technology: CodeIgniter
  • Difficulty: Intermediate - Advanced
  • Length: 45 Minutes
This entry is part 12 of 17 in the CodeIgniter From Scratch Session
« PreviousNext »

Today, we are going to take a look at the Shopping Cart library for CodeIgniter. This useful class allows us to add and remove items to a shopping cart, update them, and calculate prices. I will demonstrate how you can build a simple shopping cart system with the help of this library..


Catch Up


Day 12: Shopping Cart

Final Project

Add Comment

Discussion 103 Comments

Comment Page 1 of 21 2
  1. Stephen says:

    Awesome! Love seeing this series move forward

  2. Karthik says:

    I needed this. Thanks for the tut Burak :)

  3. Myke says:

    Ohh yeah! I have been waiting for a CI shopping cart tut.
    Sucks this is one of the last ones, right?

  4. Markus says:

    Awesome, looking forward to watching this! Huge thanks!

  5. BroOf says:

    CodeIgniter becomes slowly my favorite framework! Thank you really much for this awesome series!

  6. Oh, I wasn’t expecting this until tomorrow, what a surprise. I’ll have to watch this when I get home from work. It will be interesting to see how CI put a shopping cart system into their framework, curious to see how complex or simple it may be.

  7. Pablo Martínez says:

    Is there anywhere we can download this video tutorial????
    Nice one by the way!!!
    Congrats & thanks!!

  8. Matt Bridges says:

    Fantastic tut!

    One change / improvement I would make is that in the get() function in your model, instead of retrieving the row with result(), you can use row() and not have to then specify the first result out of that object.

    CodeIgniter has indeed become of my favorite framework because of this series. It really stinks that we’ve reached the end, but I am thoroughly looking forward to the next one you guys pump out!

  9. Can’t wait to look at this when I get home from work, interested to see how simple or complex CI’s shopping cart is. (guess my last post got deleted or something :/)

  10. Eugene says:

    I just don’t understand one thing. How does or even better, where is the interface with method index. I looked everywhere and still didn’t find it.

  11. Khalil says:

    This is going very fantastic :) series. CodeIgniter is my favorite now

    Nice tutorial, Thanks Burak (Please Don’t Stop CI Series)

  12. bralens says:

    if CI tuts come to the end then i realy loved to see tut for security, i realy like CI tuts from Jeffrey Way and Burak Guzel, they help me leran the best way to create web site for me and make Cl the beast framework for me, that i like to use and i hope the Cl tuts never ends :D
    P.S my english isnt realy good. i hope you understund wath i say and some day i will see the “CodeIgniter from Scratch: security” in this page. i appreciate all work that u all make, because they make my learning web programming realy easy and inteteresting.
    thanks you all, and i hope i will see more usefull things from this site and it will grow and grow, and some day it will be the biggest web developer site in the world (if not yet. for me it already is)

  13. Carlos says:

    Thank you Burak

    And please, please don’t stop CI Series.

  14. Rodolfo says:

    Awesome! CodeIgniter is by far my favourite PHP framework.

    Great screencast Burak, but instead of exploding the option_values, wouldn’t had been much more easier storing the options as a serialized array and the unserializing it? Maybe a little more tricky due to the serialize/unserialize thing but I think it’s a better practice.

  15. Bretticus says:

    Wrote a shopping cart using 1.7.1 just before 1.7.2 came out so I missed the cart class. Haven’t had the opportunity to checkout CI’s implementation. Thanks for an enjoyable tut.

  16. Nice Series, please don’t stop. You are helping a lot of people here. Thanks a lot!

  17. Garrafa says:

    oh, tkx by putting this on blip tv, now i can watch this last one *-*

    it seems amazing =D

  18. Jax says:

    Great tutorial, thanks for posting dude this really help me a lot. Keep it up.

  19. Jaspal Singh says:

    Awesome, Thank you for sharing.
    I was looking for CI cart code.

  20. The shopping cart is the easy part as far as I’m concerned. Try displaying the product in nested categories, applying shipping, applying tax, and checking out through your favorite gateway. These are only a small part of creating a complete eCommerce solution, and there’s a lot to think about.

    I’ve got a simple eCommerce application in the CI wiki. It’s called Community Cart. I haven’t worked on it for a while, but it’s a good start, or maybe you just want to see how somebody else did it.

    • bretticus says:

      I agree with you completely. Handling orders and money, refunds, and all the other minutiae is very time consuming.

      In reality, the CI Cart Class is not very complex and could be easily duplicated, but it’s nice to know there is a standard for that one component of the entire ecommerce system at least (Other components could be a much more difficult to implement in a “vanilla” fashion if you know what I mean. That’s probably why just the basic cart code is offered.) I am finding that one of the most appealing points of using a framework for me is that it facilitates collaboration. That is, my coworkers and I are using the same code base.

      Thanks for contributing a mature and extensive ecommerce application to the community.

      Cheers!

  21. Hieu Vo says:

    wow, I can’t believe CI series go this far :D

  22. cipi says:

    i love your tutorials.you are my hero :D

  23. woony says:

    wow, just great ! Was looking forward to something like this!

  24. mutiu says:

    this will be very useful, thank you…

  25. Khaled says:

    Very nice tut, I love this framework

  26. Drazen Mokic says:

    You have an unobstrusive voice like Jeff, i like it! This tut would nice suite with a product management backend (with CI of course). Well done!

  27. Tom Van Assche says:

    I read that this is one of the last parts, i would hate to see this series go. As soon as im making some money, ill buy a plus account, but I would be dissapointed if this series stopped.

  28. Oskarbravo says:

    Amazing tutorial Burak! Jeff spoke about creating a CMS when he first kicked the CI series off. Is that something you might think about putting together? And yes, I too think that you should definitely continue this series.

  29. Ali Baba says:

    Great tutorial for basic shopping cart. It will be nice to see database driven cart implementation and not cookie/session base. Note all data saved as cookie (ci_session).

  30. Danijel says:

    Looks very interesting. When the episode will show up in iTunes Podcasts?

  31. Maik says:

    Great tut Burak, thanks is that true that the CI series will stop, I just get my plus account just fot the codeigniter tuts.

    I would like to see this with the implementation of the check out I hope you keep working on this tuts.

  32. hookah says:

    A wonderful article. In my life, I have never seen a man be so selfless in helping others around him to get along and get working.

  33. nXqd says:

    thanks for beautiful article :)

  34. Neil Bradley says:

    Is this episode going to be released on iTunes? Both this one and Day 11 do not appear to be on iTunes yet. :(

    Thanks.

  35. Seth says:

    Hey,

    Nice tutorial. One thing I would like to see would be some Advanced Code Igniter tutorials where you go over all the stuff you keep saying is too much for this tutorial. :)

    This has been a really great series.

  36. Justin says:

    I’ve just recently switched over to aptana studio from dreamweaver, and I must say I absolutely love it. I installed the PHP plugins, but how do I get the inline tool tips with php functions (like Burak does)? It only seems to do that for css.

    Any help is appreciated!

    Great tutorial!

  37. walter says:

    Nice one! Don’t stop this series.
    Cheers

  38. leotran says:

    i can’t see video.what the matter with it?

  39. Cam says:

    Thanks for this series. I joined tuts+ long ago but only now getting around to actually watching these.

  40. Zac says:

    Awesome! Thank you for this!

  41. rachid says:

    I would like to see this with the implementation of the check out I hope you keep working on this tuts.

  42. Warrick says:

    I have been waiting for the tutorials to appear on iTunes. Do you know when this will be Jeffery?

  43. mooret says:

    Nice tutorial again. Whole CI series has been very helpfull for me.

    Please don’t stop this series. Jeff mentioned something about making a CMS in day 1. Looking forward to…

    Keep them coming!

  44. Parker says:

    I decide to switch from Aptana to Netbeans for PHP coding!!!

  45. Subhankar says:

    Very nice tutorial for beginners. Thank you so much.

  46. Tson says:

    Hi All
    i have problem with may cart, i can’t to delete product with IE 8. But with Firefox is ok.
    Please help me as soon.
    Thanks!

  47. ally says:

    nice post

    guys i need some help I’m new in web developent i m working on a project and client wants a email service in his website like google , yahoo, hotmail. please if some body can post how to build such application i ll really apreciate.

  48. hQuse says:

    Amazing video tutorials. CI is great framework. Don’t stop the series! Thank you!

Comment Page 1 of 21 2

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.