Jump to content
  • 0

Shopping Cart


Majortom

Question

Hi Guys,

Newbie to Caspio however I've created many Access Databases in the past (a while ago so slightly rusty!).  I'm trying to create an ecommerce database where a user selects items from a catalog (table in this case), goes into a shopping cart and then submits into an order.  Problem I've found with the sample databases (Simple order Management template for example) is each item goes in as a separate OrderID.  I want a user the select several items from a catalog which goes into a shopping cart and when they checkout all the items go under a single OrderID.

So at the end in the Orders table there is a single OrderID with all the items the user has selected under one record.

Are there any examples out there which would demonstrate this or anyone know the best way to go about architecting it?

 

Cheers,

MT

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello @Majortom,

One way I can see you fixing this is by creating a new table for Placed Orders. You can set it up so each record has its own OrderID. Then, in your table design, keep adding fields for as many items you may think is your biggest order (this way there is a spot for each item for large orders, otherwise small orders will just leave some fields blank).

With this, you will be able to keep track of all Items by the OrderID (may want to change to ItemID or something similar) you have, as well as having an OrderID for each order that has been placed. Each record will have an OrderID with the fields being populated with the items they ordered.

 

Screenshot (28).png

Link to comment
Share on other sites

  • 0

Hi @Majortom,

 

As I understand, you wanted to see the lists of items ordered in a single ID.

You will be needing two tables for this, one table for order, and another on for the items.

On the "Item" table, you need the Item_ID and the Items (Item name)

And add the Items you wanted to post. 

Screenshot_7.thumb.png.81c5fc038a62219faad89e48d808e16a.png

 

After this, you will create the Order table. Set the items ordered as "List/String". Set the Value as a Lookup of the Item table.

Screenshot_4.thumb.png.b155d9d45b45e299a729ec9538f9c039.png

Screenshot_5.thumb.png.58748477d3e61fa28d5e88b5e1d7a663.png

 

And your table will look like this whenever an Order is added. 

Screenshot_2.thumb.png.28f63cd14080d9207b15001f6a42fafd.png

 

Is this what you'll be needing? Let me know if this works.

 

Scarlet. 

Link to comment
Share on other sites

  • 0

Thanks for the input guys.  I think I have solved the multi item issue (please see screenshot of the tables and relationships).  Problem I am having now is how to display it.  For example on Order ID 1, my user Dave has ordered 2 servers and one storage array.  I have combined the tables via a view then created a new data page (report) based off that view.

Problem I am seeing in the report (screenshot at the bottom) and probably a layout issue is its showing the storage array twice on each line as if they've ordered 2 when they have only ordered 1.

Ideally what I want the layout to show is something like this:

CustomerID : 1

Customer Name: Dave

Servers:

Qty: 2          Form Factor:  Rack          CPU Make:  AMD         No of CPU: 2

Qty: 1          Form Factor: Tower       CPU Make: Intel             No. of CPU: 1

Storage:

Qty: 1         Protocol: Block          Type: Hybrid           Capacity TB: 100

----------------------------------------------------------------------------------------------------------------------------------------------

Relationships.jpg.c2e86fd3c5ec125d05eeee64fe579f86.jpg

Report.thumb.jpg.07ff4ea2f52c2363ffce354d13c49fe1.jpg

 

Thanks for all your help.

MT

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...