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

Join 136,473 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,560 people online right now. Registration is fast and FREE... Join Now!




OOP Shopping Cart Tutorial

 
Reply to this topicStart new topic

OOP Shopping Cart Tutorial

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

New D.I.C Head
*

Joined: 19 Jun, 2008
Posts: 2

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
+Quote Post

joeyadms
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 06:20 AM
Post #2

D.I.C Head
Group Icon

Joined: 4 May, 2008
Posts: 145



Thanked: 7 times
Dream Kudos: 600
Expert In: PHP, Web Security

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
+Quote Post

akozlik
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 10:15 AM
Post #3

D.I.C Addict
Group Icon

Joined: 25 Feb, 2008
Posts: 611



Thanked: 24 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
+Quote Post

joeyadms
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 10:33 AM
Post #4

D.I.C Head
Group Icon

Joined: 4 May, 2008
Posts: 145



Thanked: 7 times
Dream Kudos: 600
Expert In: PHP, Web Security

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
+Quote Post

akozlik
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 10:39 AM
Post #5

D.I.C Addict
Group Icon

Joined: 25 Feb, 2008
Posts: 611



Thanked: 24 times
Dream Kudos: 750
My Contributions
True. I'd have responded with:

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

Ha.
User is offlineProfile CardPM
+Quote Post

joeyadms
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 11:06 AM
Post #6

D.I.C Head
Group Icon

Joined: 4 May, 2008
Posts: 145



Thanked: 7 times
Dream Kudos: 600
Expert In: PHP, Web Security

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 - 11:07 AM
User is offlineProfile CardPM
+Quote Post

akozlik
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 11:09 AM
Post #7

D.I.C Addict
Group Icon

Joined: 25 Feb, 2008
Posts: 611



Thanked: 24 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
+Quote Post

joeyadms
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 01:28 PM
Post #8

D.I.C Head
Group Icon

Joined: 4 May, 2008
Posts: 145



Thanked: 7 times
Dream Kudos: 600
Expert In: PHP, Web Security

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
+Quote Post

Mike007
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 05:37 PM
Post #9

D.I.C Head
Group Icon

Joined: 30 Aug, 2007
Posts: 205


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
+Quote Post

akozlik
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 05:48 PM
Post #10

D.I.C Addict
Group Icon

Joined: 25 Feb, 2008
Posts: 611



Thanked: 24 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
+Quote Post

Mike007
RE: OOP Shopping Cart Tutorial
30 Jun, 2008 - 06:18 PM
Post #11

D.I.C Head
Group Icon

Joined: 30 Aug, 2007
Posts: 205


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
+Quote Post

ellisgl
RE: OOP Shopping Cart Tutorial
29 Jul, 2008 - 01:15 PM
Post #12

D.I.C Head
**

Joined: 10 Nov, 2007
Posts: 68



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
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 05:54PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month