How can I get the shoppingCart items from Payment Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello

I am new to MVC3. But have made a lot of progress working with the framework.

I have created a new Payment plugin that is similar to the Authorize.Net Plugin. In my ProcessPayment Method I want to get a list of all the shopping cart items.

Do you have a code snippet you can share

Thank you

Lorent
12 years ago
var cart = processPaymentRequest.Customer.ShoppingCartItems
   .Where(x=>x.ShoppingCartType == ShoppingCartType.ShoppingCart)
   .ToList();
12 years ago
Thanks you!
8 years ago
doesn't work for nopcommerce 3.40

Trying to find an alter solution using workContext service but that doesnt seem to work either. Any suggestions?
8 years ago
var customer = _workContext.CurrentCustomer;

            var cart = customer.ShoppingCartItems
                .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart)
                .Where(sci => sci.StoreId == _storeContext.CurrentStore.Id)
                .ToList();
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.