1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP.NET/MySQL Shopping Cart

Discussion in 'C#' started by brian.wolfe86, Nov 27, 2008.

  1. #1
    Hi,

    I made the foolish mistake of developing my first ecommerce website in ASP.NET while using a MySQL database rather than Microsoft SQL Server...now, I'm faced with finding a shopping cart and have had little success.

    Anyone know of any ASP.NET based shopping carts that support MySQL databases?

    I found this one from Page Down Tech which supports ADO.NET connections and I saw that MySQL has a connector for ADO.NET, but didn't know if this was feasible or not.

    http://www.pagedowntech.com/shopping_cart/storefront_highlights.asp


    Also...if this is a pie-in-the-sky kind of idea, can I take a PHP based shopping cart and integrate it into my ASP.NET site?


    Thanks in advance,

    Brian
     
    brian.wolfe86, Nov 27, 2008 IP
  2. yugolancer

    yugolancer Well-Known Member

    Messages:
    320
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #2
    I am afraid you cannot integrate PHP in ASP.NET.
    Your best bet can be to create custom Shopping cart.
    Actually i am really wondered that there is not shopping cart that supports mySQL.


    The .NET Framework ships with Managed Data Providers for SQL Server (System.Data.
    SqlClient namespaces), Oracle (System.Data.Oracle), OLE DB (System.Data.OleDb), and ODBC (System.Data.Odbc).

    Therefore, you can keep your application as independent as possible to the backend database, using a trick to avoid using database-specific classes, such as sqlConnection, and so on.

    Instead, you'll let the application decide at runtime which provider to use, depending on the connection string provided.

    Means, the new ADO.NET 2.0 classes allow generic data access functionality (they weren’t available in ADO.NET 1.0 or 1.1) - such as in DbConnection, DbCommand, and so on.
    These classes are grouped under the System.Data.Common namespace.

    HTH
    Regards :)
     
    yugolancer, Nov 27, 2008 IP
  3. vihutuo

    vihutuo Well-Known Member

    Messages:
    1,511
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
    #3
    You can use the built in profile provider to implement a quick shopping cart
     
    vihutuo, Nov 28, 2008 IP
  4. brian.wolfe86

    brian.wolfe86 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Built in profile provider?
     
    brian.wolfe86, Nov 28, 2008 IP
  5. vihutuo

    vihutuo Well-Known Member

    Messages:
    1,511
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
    #5
    Here is the shopping cart code that I use

    Set up the membership schema with profiles. And add a new profile property through web.config
    <add name="ShoppingCart" type="kcpita.ShoppingCart" serializeAs="Binary" allowAnonymous="true" />
    To add items to the shopping cart
     
    vihutuo, Nov 28, 2008 IP
    Halobitt likes this.
  6. brian.wolfe86

    brian.wolfe86 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Great, thanks for the code. I'll use that to port into my own custom shopping cart.

    Brian
     
    brian.wolfe86, Nov 30, 2008 IP
  7. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Creating a basic shopping cart is simple to do from scratch anyway. It is the one size fits all aspect of off the shelf that makes their programming so much more complex.

    That said, if it has been written "correctly" with a DAL then it wouldnt be overly complex to rewrite just the data access elements in the .Net, it is recreating the SQL stored procs that is the pain in the arse part
     
    AstarothSolutions, Dec 3, 2008 IP