Exemplo n.º 1
0
 /**
  * @return Cart
  */
 private function getCartOrCreateNew()
 {
     $cart = merx_current_cart();
     if (!$cart) {
         $cart = Cart::create();
         session()->put("merx_cart_id", $cart->id);
     }
     return $cart;
 }
Exemplo n.º 2
0
 private function newCart()
 {
     return Cart::create();
 }
Exemplo n.º 3
0
 protected function createCartAndClient()
 {
     $cart = Cart::create();
     session()->put("merx_cart_id", $cart->id);
     $cart->addItem(new CartItem($this->itemAttributes()));
     $this->loginClient();
 }
Exemplo n.º 4
0
Arquivo: Merx.php Projeto: dvlpp/merx
 /**
  * @return Cart
  */
 private function newCart()
 {
     $cart = Cart::create();
     if (config("merx.uses_session", true)) {
         session()->put("merx_cart_id", $cart->id);
     }
     return $cart;
 }