so heres the skinny... ive already got this thing running and serving products just fine... the only hitch is that its (in my opinion) a little tacky b/c everytime you add a item to your "cart" it takes you to paypal...

so, i want to hold the "cart" on my end and then process through paypal at the end

so heres my setup... its all xml based and driven since theres only about 30-40 products and things rarely change...

that being said heres what, in my mind, makes sense todo

1) user hits the cart
2) we start a session and give it a timeout, say 20 minutes
3) when the user "adds" an item we expand an array stored in the session and bring the user right back to where they were and update the items # in the cart link
4) user clicks check out and are brought to their cart
5) when the cart loads it performs a check to see if the items in a users cart qualify them for any deals or specials being ran... at this point the user is also able to apply a coupon code or enter a gift cert code
6) the user is happy and clicks final check out to paypal and i somehow send the order contents to paypal with the final amount
7) use a call back or detect that we are done with this order and destroy the users session and affectively empty their cart

thats rather quickly how i see it going down

im not looking for code here, just advice and opinions

thanks

    sounds good and normal
    this is how most shopping carts work

    now, there are plenty of open source applications for shopping carts in PHP
    some more basic and some more advanced
    See for example at http://www.opensourcecms.com/
    Left menu -> e-Commerce

    but it is always more fun to reinvent the wheel
    if you are a true amateur php coder
    😉

      well like i said... i already have the content taken care of its just the item basketting and checkout with paypal

      i think i need to just start coding like i did when i dove into the whole xml based thing and just sort things out one by one

      and yes... for me, re-inventing the wheel rules... with every opensource cms/cart ive used ive spent WAY too much time customizing and figuring out plug-ins to NOT just make something myself...

        "but it is always more fun to reinvent the wheel
        if you are a true amateur php coder"

        Not really. PHP is a bit of a funny one as there can be 100 undisciplined ways to do the same thing that can easily eat more time than writing it yourself. There is always a sacrifice in using a big prebuilt system. It is concentrating on smaller agnostic libraries ( such as the Zend framework libraries/Pear ) that is far more relevant. The bigger the system you implement that is tied exclusively to other developers organisation/management/programming skills means the more you are at their mercy. If you want to make changes to it how will bug fix updates recurse through your custom changes?

        Not invented here ( http://en.wikipedia.org/wiki/Not_Invented_Here ) syndrome is a bit more complicated to appreciate. What if the system you plan to integrate is a big ball of mud( http://en.wikipedia.org/wiki/Big_ball_of_mud ). Can you tell it is a big ball of mud? At what point is something a pile of spaghetti? Ask different people and you will get different answers.

        There are plenty of things I'd rewrite rather than physically use( from a users point of view ) let alone modify from a code point of view.

        http://en.wikipedia.org/wiki/Anti-pattern is worth reading. You can add some more of them to your itinerary 😉

          There is always a sacrifice in using a big prebuilt system.

          Sometimes really it is.
          You many times dont get precisely what you need or had in mind.
          If you can and you willing to develop your custom shopping cart
          it will do what you want.
          This is upto each user and each situation.

          Speaking for myself, I would download a few shopping carts and try them.
          If there is one that meet my reqiurements well I might consider install this.
          And make my own modifications to make it fit.

          If I do not find any shopping cart, that reasonably is in line with my wish
          I would start making one.
          Maybe using some of those ideas in those shopping carts I had a look at.

          Say you want a discussion board.
          Why doesnt everyone php coder write his own board software?
          For example here at phpbuilder.

          It is not that owner/admins lack the knowledge to write their own phpbuilder software.

          It is the fact that there was a board, that reasonably could meet the requirements
          and so vBulletin was chosen.

          🙂
          It is always fun to write your own blog/cms/guestbook/bb/cart
          and whatever you need.
          But sometimes you do not have the time or want to waste effort on it.
          you might as well have a look at existing options,
          before reinventing the wheel.

          Just because you want a special house to live in,
          you do not have to build it.
          You may go looking for some house that you find suitable
          and then you maybe adjust it a little to your liking.

          🙂

            I myself prefer osCommerce. I have setup several already and its not that hard to get the guts up and to modify it.

            osCommerce

            Here is a site I used osCommerce for.

            ideachannel.com

            There is quite a few mod's out for it and I have used it on Unix and Windows platforms.

            Just a suggestion.

            regards,
            Don

              Write a Reply...