modules/acm_cart/src/CartStorage.php
public function pushCart() {
    $cart = $this->cart;

    if (!$cart) {
      return;
    }

    // Cart exists, derive update array and update cookie.
    $this->setCookie('acm_cart_id', $cart->id());
    $update = $cart->getCart();
    $cart_event = $this->eventDispatcher->dispatch(Events::PUSH_CART, new CartPushEvent($update));
    $cart_response = (object) $this->apiWrapper->updateCart($cart->id(), $cart_event->getRawCart());

    if (empty($cart_response)) {
      return;
    }

    return $cart;
  }
public function pushCart() {
    $cart = $this->cart;

    if (!$cart) {
      return;
    }

    // Cart exists, derive update array and update cookie.
    $this->setCookie('acm_cart_id', $cart->id());
    $update = $cart->getCart();
    $cart_event = $this->eventDispatcher->dispatch(Events::PUSH_CART, new CartPushEvent($update));
    $cart_response = (object) $this->apiWrapper->updateCart($cart->id(), $cart_event->getRawCart());

    if (empty($cart_response)) {
      return;
    }

    return $cart;
  }
public function pushCart ( ) { $ cart = $ this -> cart ; if ( ! $ cart ) { return ; } // Cart exists, derive update array and update cookie. $ this -> setCookie ( 'acm_cart_id' , $ cart -> id ( ) ) ; $ update = $ cart -> getCart ( ) ; $ cart_event = $ this -> eventDispatcher -> dispatch ( Events :: PUSH_CART , new CartPushEvent ( $ update ) ) ; $ cart_response = ( object ) $ this -> apiWrapper -> updateCart ( $ cart -> id ( ) , $ cart_event -> getRawCart ( ) ) ; if ( empty ( $ cart_response ) ) { return ; } return $ cart ; }
Pushes the cart to the ecommerce app via the Connector API.

@deprecated Use updateCart() instead.

@return null|\Drupal\acm_cart\CartInterface
Returns the cart data as sent by the ecommerce backend
Pushes the cart to the ecommerce app via the Connector API .