/** * {@inheritdoc} */ public function setStore(StoreInterface $store) { $this->set('store_id', $store->id()); return $this; }
/** * {@inheritdoc} */ public function getCartId($order_type, StoreInterface $store, AccountInterface $account = NULL) { $cart_id = NULL; $cart_data = $this->loadCartData($account); if ($cart_data) { $search = ['type' => $order_type, 'store_id' => $store->id()]; $cart_id = array_search($search, $cart_data); } return $cart_id; }