Copied to clipboard

Flag this post as spam?

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


  • Himasankar 1 post 21 karma points
    Sep 07, 2011 @ 15:11
    Himasankar
    0

    can we bypass stock availability check while adding items to shopping cart?

    Hi, The AddOrderItem() method seems to be doing stock availability check as well but I need to add the order to be added to the shopping cart irrespective of stock availability. Is there a way I can bypass the stock availability check and add the order to the shopping cart? Currently it doesn't let me add a product for which the Quantity has been set as 0 in umbraco admin. But my client wants the order needs to be added first and then do the availabiilty check while checking out. Please let me know if there is a way to do this.

    Any help is highly appreciated...

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @using umbraco.cms.businesslogic.Tags
    @using umbraco.cms.businesslogic.web
    @using umbraco.cms.businesslogic.member
    @using umbraco.MacroEngines
    @using System.Linq
    @using I.Extension
    @{
        string imageUrl = Model.Image1.ToString();
        imageUrl = imageUrl.ToImageGenUrl(91, 116);
        int Quantity = Request["Quantity"].ToInteger();
        int ProductId = Request["ProductId"].ToInteger();
        OrderItemModel currentItem = null;
       

        currentItem = CartRepository.AddOrderItem(ProductId, Quantity, Unit);

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies