Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

My simple answer is no. A shopping cart implies a lot of things. Let's start by making the arbitrary assumption that you already have a way to process completed orders. This means you have a secure, working way to take some message sent from your system and process the credit card info from it (again securely) and turn that into a real order that will be shipped and tracked and so on.

Assuming you have that all wrapped up, then what you're asking about is a way to create and store and deliver that message to the magical order processing system. What that boils down to is maintaining state. This is something many wiser than I have covered:

What you're task is is to take some token - an id with password, an email address - and associate that with some list of values - the items in the cart. You may want to make it simple, i.e. you create as you go and then you check out or dump it. Or you may want people to be able to shop a bit now, shop a bit later. The more features means the more complexity.

You may want to poke around on and to see if you can find what you need there.

Also, you should see CPAN for modules to help with creating sessions, which would be the key to the more advanced features.

"A man's maturity -- consists in having found again the seriousness on +e had as a child, at play." --Nietzsch +e

In reply to Re: Shopping Cart by jptxs
in thread Shopping Cart by Kiko

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2023-01-30 07:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found