Web Analytics Made Easy -
StatCounter Making a BASIC shopping cart system - CodingForum

Announcement

Collapse
No announcement yet.

Making a BASIC shopping cart system

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Making a BASIC shopping cart system

    What I have found allot is people build their eCommerce site around a shopping cart system.

    What I want to do is build a shopping cart system around my website.
    I do not want a hectic shopping cart system, all I want is a simple "Add to cart" <A> link on the product page that will add the item to the cart, and a cart page that simply lists what they have added to their cart, and how much the total ammount of their cart is.

    I've looked at numerous tutorials on the internet, but have found many of them deeply flawed in code, and I am wondering if someone could tell me the best way about going with what I want to do?

  • #2
    Do you have a secure site (https)?

    If not, you'll be leaving your site for all of the CC transaction.
    Tell us who your credit card merchant will be.


    .

    Comment


    • #3
      Using Session variables will probably be the best idea. Sessions are unique (supposed to be) between clients, and are alive for the length of time the client browses your site actively, plus a timeout period. I would look into that.

      msleim is right, if you don't have an https enabled site, you'll have to use outside merchant tools like paypal etc. to take credit card transactions. This might be your intention anyway, but it's something you should be aware of.
      Useful function to retrieve difference in times
      The best PHP resource
      A good PHP FAQ
      PLEASE remember to wrap your code in [PHP] tags.
      PHP Code:
      // Replace this
      if(isset($_POST['submitButton']))
      // With this
      if(!empty($_POST))
      // Then check for values/forms. Some IE versions don't send the submit button 
      Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

      Comment


      • #4
        Knowing who your credit card merchant is important in how we answer your post.
        Each CC merchant has different requirements, and offers different PHP code examples.


        .

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎