Quantcast
Channel: NBStore Discussions Rss Feed
Viewing all articles
Browse latest Browse all 4081

New Post: Cart Item's Dissapear on Viewing Cart

$
0
0
Hi,

I have created a custom DNN module to display products and added an 'add to cart' button that uses the 'AddToCart' method. It all seems fine if you look in the database, there is a cart and the cartitem is created and looks fine.

However then when I go to view the page with the checkout control on, it deletes the cart item ?? The cart seems to kind of half know this, as it displays, but displays with $0 and no items in it. If you refresh again it says there are no items in the cart.

All very odd, this is how I add to the cart, I have fixed the product for test purposes and have tried variations such as just including the model ID and setting the item to -1 as I have seen somewhere... so far nothing
        Dim cii As New NEvoWeb.Modules.NB_Store.NB_Store_CartItemsInfo()

        cii.CartID = NEvoWeb.Modules.NB_Store.CurrentCart.getCartID(PortalController.GetCurrentPortalSettings.PortalId())
        cii.DateCreated = DateTime.Now
        cii.Discount = 0
        cii.ItemDesc = myProduct.ProductName
        cii.ItemID = 1
        cii.ModelID = 1
        cii.Quantity = 1
        cii.UnitCost = 5

        NEvoWeb.Modules.NB_Store.CurrentCart.AddItemToCart(PortalController.GetCurrentPortalSettings.PortalId(), cii)

Viewing all articles
Browse latest Browse all 4081

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>