Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: shopping cart

  1. #1
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default shopping cart

    I'm having a bit of fun and building my own .net and sql shop with cats, products, cart, and checkout.

    does anyone know of any sites that have tutorials for shopping system, or open source systems. I have a system i'm building from my mind!

    just would be interested to see how other people have handled shop categories and child catagories...

  2. #2
    Join Date
    Sep 2006
    Posts
    210
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    I run a heavly modified version of the .Net 1.1 starter kit, but I do not have any child categories, just staright forward categories

  3. #3
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    the way i have seen similiar systems is that you create one table that contains categories. you have one colum which describes the parent of each category or less it is a top level category and then set parent to null or similiar.

    i have a strong interest regarding ecommerce in terms of building ecom software and could not find any decent books on amazon or safari regarding the principles of ecommerce or how to build such software. if you find any please let me know. if you have any questions regarding ecommerce let me know.

  4. #4
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    cheers for the tips, thanks.

  5. #5
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    PErsonally I don't like using 'null' in a database, however there are instances where you should use it. In the instance of a creating Categories or Groups I prefer using an Integer value :

    CategoryId Int Primary Key IDENTITY(1,1) NOT NULL
    ParentCategoryId Int [Default = 0] NOT NULL

    (note: the above is pseudo-code and probably won't work in any DB).

    I use these fields at http://www.kingflw.com to generate the Category list which has the ability to go to any depth.

    Sol

  6. #6
    Join Date
    Mar 2005
    Location
    Isle of Man
    Posts
    1,261
    Thanks
    3
    Thanked 24 Times in 24 Posts

    Default

    parent/child relationships (adjacency model) are spot on for small hierarchies, if the nesting is deeper however I find that a nested set approach can be very much more efficient to query on.

  7. #7
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    ok, what i'm interested in now, is retriving the information efficiently.

    so you have a database with catID, catName, catParent (0 being top level) - and maybe catOrder (parents being ordered and children ordered within)

    what's the best way to loop through and retrive the data? pile it all into an array and sort through the relationships, or keep reconnecting with different queries as you work through?... any other method?? (haven't got this far yet, just finished playing with uploading and resizing images with .net - if you've seen my other post!!)

  8. #8
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default asp:viewtree

    I don't know if anyone is interested, but i found this nice little class for .net 2 - the tree!

    http://msdn2.microsoft.com/en-us/lib....treeview.aspx

  9. #9
    Join Date
    Mar 2005
    Location
    Isle of Man
    Posts
    1,261
    Thanks
    3
    Thanked 24 Times in 24 Posts

    Default

    Quote Originally Posted by creativeworks View Post
    ok, what i'm interested in now, is retriving the information efficiently.

    so you have a database with catID, catName, catParent (0 being top level) - and maybe catOrder (parents being ordered and children ordered within)

    what's the best way to loop through and retrive the data? pile it all into an array and sort through the relationships, or keep reconnecting with different queries as you work through?... any other method?? (haven't got this far yet, just finished playing with uploading and resizing images with .net - if you've seen my other post!!)
    The adjacency model tends to force recursion be it within some SQL or within your applicatin code. Each level is determined by the previous level in the stack. So while it is simple to administer the efficiency drops considerably as the nesting complexity increases.

    That's where nested sets out shine because each row contains two values that can cleverly be used without recursive calling to pull out trees of data.

    Which method to use really depends on the depth of the data structure and the most common ways the data will be accessed.

  10. #10
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    Nested Sets? never heard of them... until now!... really intriguing. so yes, at this moment i'm solely using the Adjacency model - and I already have some recursive code...

    What i'm now interested in is using both, together...

    If the basis of my categories are constructed using the Adjacency model, does anyone have any links to using VB.NET to self maintain a Nested Set model on the side, as the front end of the site would benefit from using this model.

    I'm currently working on trying develop a solution in my mind, but the concept on paper (screen!) would help.

    http://www.intelligententerprise.com...questid=235427 here's an example of SQL code self maintaining hierarchies. I would prefer to get my head around using vb.net...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. asp.net Shopping Cart
    By Furzetech in forum E-Commerce/Shopping Cart Applications
    Replies: 11
    Last Post: 10th May 2006, 12:10 PM
  2. ASP.net Shopping Cart Recommendations
    By jaimalchohan in forum ASP.NET
    Replies: 6
    Last Post: 26th February 2006, 10:25 AM
  3. Best shopping cart
    By terraqueotenaz in forum Web Applications and Scripts
    Replies: 3
    Last Post: 3rd March 2005, 12:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •