Recent Topics

Get cart items in controller like in Payment class abstract

  • Hi, I would like to take the items from the cart in my payment package as they are taken in paypal only I need them in the controller.
    How can I proceed?
    I tried to do that

     $cart = $this->getCart();

    But I do this in the controller and I can't extend it to the payment class
    Another solution?

  • Hi @DaniD,

    We have created a Facade for the Cart class. So you can directly access this as well.

    use Cart;
    $cart = Cart::getCart();

Log in to reply