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.

  • Tony Kiernan 278 posts 341 karma points
    Jul 20, 2011 @ 13:47
    Tony Kiernan
    0

    "Cannot create basket when not in product catalog"

    Error being thrown up by my mini basket.  Seriously?  This is occuring on the oeder confirmation page.  (It sohuld be giving the empty message)

  • Tony Kiernan 278 posts 341 karma points
    Jul 20, 2011 @ 13:49
    Tony Kiernan
    0

    "order confirmation page"

    "should be giving"

  • Lasse Eskildsen 34 posts 57 karma points
    Jul 21, 2011 @ 11:29
    Lasse Eskildsen
    0

    Hi Tony,

    Do you use the XSLT API?

    It so, I'm guessing that your confirmation page is not within a catalog context (in the url). You can use an overload to the GetBasket that taken a boolean, indicating whether or not is should create a new basket, if one does not exist (and it probably doesn't, since you have completed in before the confirmation page).

  • Christian Wendler 46 posts 155 karma points
    Jul 22, 2011 @ 17:14
    Christian Wendler
    0

    I'm using the following little helper in my XSLT extension to set the catalog context manually:

    public static string SetCatalogContext(string catalog) {
        SiteContext.Current.CatalogContext.CurrentCatalogName = catalog;
        return "";
    }

    You might want to add a property to your homepage/website doc type holding the name of your catalog and pass this value to SetCatalogContext in your XSLT.

    Bye

    Christian

  • Tony Kiernan 278 posts 341 karma points
    Jul 25, 2011 @ 15:20
    Tony Kiernan
    0

    I'm doing this with Razor

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jul 28, 2011 @ 17:31
    Søren Spelling Lund
    0

    Hi Tony,

    Calls to SiteContext.Current.OrderContext.GetBasket() will trigger uCommerce to assign a new basket to the customer by default. I believe that you might have a call like that your mini cart macro, which is causing the issue.

    You can either

    1) Remove the mini cart completely from your page (you probably knew that already :))

    2) or you can do a call to SiteContext.Current.OrderContext.GetBasket(false) instead, which will not try and assign a new basket to the customer.

    3) or finally you could assign a catalog name to the SiteContext.Current.CatalogContext.CurrentCatalogName, which will allow uCommerce to assign the basket to the customer (basically it needs to know which currency to work with from the catalog)

    Hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft