Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Get cart items in controller like in Payment class abstract

    General Discussion
    2
    2
    406
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @DaniD,

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

        ...
        use Cart;
        ...
        $cart = Cart::getCart();
        ...
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post