Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Alpha Sports Web? Shopping Cart Example?

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

    Alpha Sports Web? Shopping Cart Example?

    I need to do a shopping cart.

    When I search here, I see lots of requests for examples, but no actual examples.

    I don't seem to have Alpha Sports Web in my Samples. I see posts here looking for it also - and some mentions of it not working well.

    So - does anybody know where I can get Alpha Sports Web (cause all the listings in the Help files reference that)? If it works in Alpha Five V 10? and/or any example of a shopping cart?
    Wendy Welton
    Architect
    past & future Alphaholic - deliberately falling off the wagon!

    http://www.artformhomeplans.com/

    #2
    Re: Alpha Sports Web? Shopping Cart Example?

    Pseudo code:

    When an item is added to the cart - check if one exists.
    If it does - add the item

    If it does not, create the cart and add the item.

    You want to set a variable to keep track of their current cart

    if eval_valid("session.__Protected__cart_id")==.f. then
    session.__protected__cart_id=api_uuidcreate()
    end if

    'insert item
    sql="INSERT INTO cart_items (cart_id,user_id) VALUES ('"+session.__protected__cart_id+"',"+session.__protected__ulink+")"

    When they checkout just
    delete session.__protected__cart_id


    gluck.
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    [email protected]

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

    Comment


      #3
      Re: Alpha Sports Web? Shopping Cart Example?

      Originally posted by aburningflame View Post
      When they checkout just
      delete session.__protected__cart_id
      What if they cancel the order? Now you have inserted those records.
      Peter
      AlphaBase Solutions, LLC

      [email protected]
      https://www.alphabasesolutions.com


      Comment


        #4
        Re: Alpha Sports Web? Shopping Cart Example?

        Delete the records.

        It depends on your requirements.
        I use a 2 table approach.

        cart table
        ------------
        cart id
        userid
        created_on
        cancelled

        cart_items
        ----------------
        cart_id
        item_id
        qty
        date_added

        When they cancel an order - you set cancelled on the cart to 1. Or, delete the cart and the cart items in a transaction.

        I was merely giving her a starting point - not a full solution.
        Scott Moniz - Computer Programmer/Analyst
        REA Inc.
        http://reainc.net
        (416)-533-3777
        [email protected]

        REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
        If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
        contact us to discuss options.

        Comment


          #5
          Re: Alpha Sports Web? Shopping Cart Example?

          Hi Wendy, the answer to your question is, Alpha Sports web samples used to come with alpha, but not anymore. As you can see from a post of mine earlier today, I am on the same quest as you, i.e I am currently working through the pages of Alpha Sports Web that came with my V8, trying to build my own shopping cart. However, it ain't easy. I think Alpha Sports has many more pages than required, with popups and confirmation windows all over the place.

          I just want a Google searcher to land on one of my products, hit the 'buy it now' button, Alpha to 'IF' an order record id not open, open one, and then add the item as a child record to that order. Then to allow the shopper to add further items to that order number, or check out. Simple.

          But not to me! It currently looks higher than Mount Everest, but I WILL get there. There is definitely a Feature Pack opportunity here. Anyway, I wish you luck, and do please let me know if and when you get your cart done. Meanwhile, where did I leave that oxygen?

          Kind regards,
          Larry

          Comment


            #6
            Re: Alpha Sports Web? Shopping Cart Example?

            Hi Wendy/Larry,
            If you guys need help with integrating/creating your shopping cart, or if you require programmer assistance (beyond the help of this forum) - please feel free to email me.

            The cart table/item approach above will work.

            You guys plan on a backend database to hold cart information right?
            Anyhow - if you have any questions, feel free to ask, and if you need any programming assistance, feel free to contact us with inquiries or quotes etc.

            Good luck guys!
            Scott Moniz - Computer Programmer/Analyst
            REA Inc.
            http://reainc.net
            (416)-533-3777
            [email protected]

            REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
            If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
            contact us to discuss options.

            Comment


              #7
              Re: Alpha Sports Web? Shopping Cart Example?

              Originally posted by Larry Gordon View Post
              Alpha to 'IF' an order record id not open, open one, and then add the item as a child record to that order. Then to allow the shopper to add further items to that order number, or check out. Simple.
              Little snippet to get you both started - if you feel like you need extra help, feel free to contact us.
              Code:
              dim conn as SQL::Connection
              dim args as SQL::Arguments
              dim cart_id as C
              dim flagerror as L=.f.
              
              if conn.open("::name::myconn") then
                  if conn.begintransaction() then
                        if eval_valid("session.__protected__currentcart") then
                            cart_id=session.__protected__currentcart
                        else 
                            cart_id=api_uuidcreate()
                        end if
                        args.set("cart_id",cart_id)
              
                        sql="INSERT INTO cart (cart_id, otherfields) VALUES (:cart_id, othervars)"
                        IF conn.execute(sql,args) then
                            sql="INSERT INTO cart_item (cart_id, item_id, otherfields) VALUES (:cart_id, item_id, othervars)"
                            IF conn.execute(sql, args)==.f. then
                                 flagerror=.t.
                            end if
                        else
                           flagerror=.t.
                        end if
              
                        if flagerror==.f. then
                             if conn.committransaction()==.f. then
                                flagerror=.t.
                             end if
                        end if
                  else
                     'handle this error
                  end if
                 
              else
                  'handle this error
              end if
              Scott Moniz - Computer Programmer/Analyst
              REA Inc.
              http://reainc.net
              (416)-533-3777
              [email protected]

              REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
              If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
              contact us to discuss options.

              Comment


                #8
                Re: Alpha Sports Web? Shopping Cart Example?

                Hi Scott,
                Thanks for the advice and help offer. I will see how far I can get over the next few days and then take it from there.
                Kind regards,
                Larry

                Comment


                  #9
                  Re: Alpha Sports Web? Shopping Cart Example?

                  Hi Scott,
                  Could I be really cheeky and ask how I should amend your code to reflect that my data is held in alpha .dbf tables?
                  Kind regards,
                  Larry
                  PS. Wendy, sorry for muscling in on your post!

                  Comment


                    #10
                    Re: Alpha Sports Web? Shopping Cart Example?

                    Hey Larry,
                    Unfortunately I don't work with DBFs.
                    I only work with sql.

                    I'm not even sure if DBFs supports the transactional commands. If you are just starting the project - I may recommend going the MySQL route.

                    Anyhow - maybe someone on this forum who works with DBFs can change my code for you.

                    Here is a great read - I am not sure it pertains to DBF - but it is worthwhile.

                    http://www.downloads.alphasoftware.c...SQLTables.html
                    Scott Moniz - Computer Programmer/Analyst
                    REA Inc.
                    http://reainc.net
                    (416)-533-3777
                    [email protected]

                    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                    contact us to discuss options.

                    Comment


                      #11
                      Re: Alpha Sports Web? Shopping Cart Example?

                      Larry

                      No sweat. I've gotten sucked into paid work recently "how dare they distract me! ;-) - so haven't had time to follow up on this - oh, and I'm dbf too!
                      Wendy Welton
                      Architect
                      past & future Alphaholic - deliberately falling off the wagon!

                      http://www.artformhomeplans.com/

                      Comment


                        #12
                        Re: Alpha Sports Web? Shopping Cart Example?

                        I agree with Larry,
                        This is a great opportunity for a V11 shopping cart feature pack. While Alpha is at it they should pick or partner with a payment gateway and integrate the API with the cart. This would help monetize
                        your Alpha web app.

                        Bob

                        Comment


                          #13
                          Re: Alpha Sports Web? Shopping Cart Example?

                          Originally posted by bob9145 View Post
                          I agree with Larry,
                          This is a great opportunity for a V11 shopping cart feature pack. While Alpha is at it they should pick or partner with a payment gateway and integrate the API with the cart. This would help monetize
                          your Alpha web app.

                          Bob
                          I agree completely. I think Alpha Five is SO CLOSE to being full featured for web site development, but the lack of either a feature or a decent sample/example for a shopping cart is a pretty glaring hole.
                          Wendy Welton
                          Architect
                          past & future Alphaholic - deliberately falling off the wagon!

                          http://www.artformhomeplans.com/

                          Comment


                            #14
                            Coming Soon?

                            "Constructing a functional Ecommerce Shopping Cart with Alpha5"

                            "Integrating your Alpha Shopping Cart with a payment API"


                            This is probably an 11th hour suggestion for the 11th edition of Alpha considering it would probably take a team 6 months to assimilate it into an Alpha builder, but it would be a golden goose for Alpha and its developer community.

                            Sounds like a great present just in time for Cyber Monday's $1028M+ in e commerce sales!

                            Bob

                            Comment


                              #15
                              Re: Coming Soon?

                              Originally posted by bob9145 View Post
                              "Constructing a functional Ecommerce Shopping Cart with Alpha5"

                              "Integrating your Alpha Shopping Cart with a payment API"


                              This is probably an 11th hour suggestion for the 11th edition of Alpha considering it would probably take a team 6 months to assimilate it into an Alpha builder, but it would be a golden goose for Alpha and its developer community.

                              Sounds like a great present just in time for Cyber Monday's $1028M+ in e commerce sales!

                              Bob
                              11th hour yes - but if it's a feature pack, it comes out when it comes out. It looks like the feature packs for 10 came out at various times?

                              I think web developers are a nice big pool of potential new users for Alpha Five. So many web sites have some kind of sales component that I think this feature would be a real plus in their sales efforts.
                              Wendy Welton
                              Architect
                              past & future Alphaholic - deliberately falling off the wagon!

                              http://www.artformhomeplans.com/

                              Comment

                              Working...
                              X