Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 118,501 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,069 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



OOP Shopping Cart Tutorial

 
Reply to this topicStart new topic

OOP Shopping Cart Tutorial

technotool
post 30 Jun, 2008 - 06:49 AM
Post #1


New D.I.C Head

*
Joined: 19 Jun, 2008
Posts: 1

Could anyone create a OOP PHP Tutorial that builds a shopping cart. I think that it would be an invaluable resource for those of us trying to make the leap over to OOP....which is not easy. I completed a shopping cart tutorial to learn procedural PHP and it was like a moonshot in my understanding of php. To earn the love and adoration of thousands of PHP'ers please make this tutorial.

Thanks

Technotool... rolleyes.gif
User is offlineProfile CardPM

Go to the top of the page


joeyadms
post 30 Jun, 2008 - 07:20 AM
Post #2


D.I.C Head

Group Icon
Joined: 4 May, 2008
Posts: 145



Thanked 6 times

Dream Kudos: 600
My Contributions


If noone else makes one before me, I'll make one sometime this week when I get a chance.
User is offlineProfile CardPM

Go to the top of the page

akozlik
post 30 Jun, 2008 - 11:15 AM
Post #3


D.I.C Addict

Group Icon
Joined: 25 Feb, 2008
Posts: 543



Thanked 20 times

Dream Kudos: 750
My Contributions


Ha, joeyadms, you'll need to write a book.

OOP PHP Shopping Carts for DIC Heads
User is offlineProfile CardPM

Go to the top of the page

joeyadms
post 30 Jun, 2008 - 11:33 AM
Post #4


D.I.C Head

Group Icon
Joined: 4 May, 2008
Posts: 145



Thanked 6 times

Dream Kudos: 600
My Contributions


It would seriously be a pretty involved tutorial haha. Shopping carts are heavy duty.

My tutorial would prob just be a watered down shopping cart, but would present the ideas on how to do it in a OO way.
User is offlineProfile CardPM

Go to the top of the page

akozlik
post 30 Jun, 2008 - 11:39 AM
Post #5


D.I.C Addict

Group Icon
Joined: 25 Feb, 2008
Posts: 543



Thanked 20 times

Dream Kudos: 750
My Contributions


True. I'd have responded with:

http://www.zen-cart.com/

Ha.
User is offlineProfile CardPM

Go to the top of the page

joeyadms
post 30 Jun, 2008 - 12:06 PM
Post #6


D.I.C Head

Group Icon
Joined: 4 May, 2008
Posts: 145



Thanked 6 times

Dream Kudos: 600
My Contributions


Zen cart ftw, but if you got the skills, no reason to not roll your own

Well I take that back, its better to "know" how to roll your own, haha

This post has been edited by joeyadms: 30 Jun, 2008 - 12:07 PM
User is offlineProfile CardPM

Go to the top of the page

akozlik
post 30 Jun, 2008 - 12:09 PM
Post #7


D.I.C Addict

Group Icon
Joined: 25 Feb, 2008
Posts: 543



Thanked 20 times

Dream Kudos: 750
My Contributions


LOL yeah, no point reinventing the wheel. It's good to know how it works though because we all know that you'll eventually want it to do something it can't. I'm always nervous advising people on how to build their own carts because there are so many things to take into account. It's really something better handled by a team when you get down to the gritty details. A general overview though would be good I think.
User is offlineProfile CardPM

Go to the top of the page

joeyadms
post 30 Jun, 2008 - 02:28 PM
Post #8


D.I.C Head

Group Icon
Joined: 4 May, 2008
Posts: 145



Thanked 6 times

Dream Kudos: 600
My Contributions


Yeah, because you want you code to be modular and reusable, and to make a cart that can be modified slightly to be a drop in on any site would take a crap load of designing before even touching a keyboard.
User is offlineProfile CardPM

Go to the top of the page

Mike007
post 30 Jun, 2008 - 06:37 PM
Post #9


D.I.C Head

Group Icon
Joined: 30 Aug, 2007
Posts: 200



Dream Kudos: 75
My Contributions


QUOTE(joeyadms @ 30 Jun, 2008 - 02:28 PM) *

Yeah, because you want you code to be modular and reusable, and to make a cart that can be modified slightly to be a drop in on any site would take a crap load of designing before even touching a keyboard.


Oh yeah I heard that song before. It is so hard to create something truly modular, everytime I think I got it, I either hit a wall or it becomes too complex to be truly useful.

Well I guess the hard part would be connecting the cart to the products database. I can also see the word XML coming to mind, but like you said a lot of planning. But hey, I say there are no good tutorials that teach you how to plan your design on the web, if you can include this in your tutorial it can be truly valuable.
User is offlineProfile CardPM

Go to the top of the page

akozlik
post 30 Jun, 2008 - 06:48 PM
Post #10


D.I.C Addict

Group Icon
Joined: 25 Feb, 2008
Posts: 543



Thanked 20 times

Dream Kudos: 750
My Contributions


I'll get that one. You can actually check out my blog on DIC and I wrote an article about the importance of planning your software. Check it out in the blogs section.
User is offlineProfile CardPM

Go to the top of the page

Mike007
post 30 Jun, 2008 - 07:18 PM
Post #11


D.I.C Head

Group Icon
Joined: 30 Aug, 2007
Posts: 200



Dream Kudos: 75
My Contributions


Yeah I saw something like that, I will read it. But all I'm saying is that most tutorials out there get right up to business without explaining why or how their design will look like. So with something more complex like that I would expect to see that planning part. I never see any UMLs or ERDs or anything like that.

But I will check out your blog entry, I think I read some of it..
User is offlineProfile CardPM

Go to the top of the page

ellisgl
post 29 Jul, 2008 - 02:15 PM
Post #12


D.I.C Head

**
Joined: 10 Nov, 2007
Posts: 56



Thanked 1 times
My Contributions


X-Cart is better - but not free.

There's a lot of "howtos" for PHP carts and stuff. Just have to figure out which way you want to go with it..

The problem I have with most carts is that there is usually not a way to do split payments.

Image handling can be weird too.

Also no standards on what should defined for a product. I have few ideas what should be included.. Of course I go overboard in trying to blanket allllll wishes...
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/11/08 07:44AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month