Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Phil Crowe 192 posts 256 karma points
    Jan 04, 2012 @ 14:25
    Phil Crowe
    0

    adding item to basket using c#

    Im trying to create a usercontrol that adds one of the default products from the ucommerce 2.0 package to the shopping cart:

            Library.AddToBasket("Software", 2, "002");
            SiteContext.Current.CatalogContext.CurrentCatalogName = "uCommerce.dk";
            Response.Write("added");

    After this code rtuns the 'added' text apeears at the top of the page but the smallcart xslt still shows the cart is empty. How can i add a product to a cart in c#? 

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 09, 2012 @ 11:30
    Søren Spelling Lund
    0

    3 Steps to Managing Multiple Basket Items as One has some good information on the API to use to add to cart from C#.

  • Phil Crowe 192 posts 256 karma points
    Jan 09, 2012 @ 12:00
    Phil Crowe
    0

    darn wish i saw this sooner. i ended up using your xslt for add to basket but changing it to match how my site works. I needed to add more datatypes to the products and couldnt find a way to do this in the ucommerce section of the cms. so i created a custom datatype where i could select a product from ucommerce. then created my product pages as you would created any standard umbraco page in the cms but i had the flexibility of adding my own datatypes i could then select the product this page will sell from a radiobutton list. I did some xslt to find the product that had been selected for that page.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 16, 2012 @ 10:29
    Søren Spelling Lund
    0

    If it gets the job done. No worries :)

    For future reference many articles are available from our site in the support section.

Please Sign in or register to post replies

Write your reply to:

Draft