I have a session lifetime of 120 minutes in my Laravel config. How can you implement that for authorized users the goods are stored longer (for example, a month), and for unauthorized users, as usual, 120 minutes? I made a cart through the Session facade If you need me to share the shopping cart code, ..
Category : cart
I am new to Laravel. Add to cart button to add same product into cart with +1 quantity. Trying to check if stock greater than qty. When one item is qty 3 than 2 stock I would like to display some text "The requested qty is not available" instead of form submit. Is this possible? ..
I am new Laravel. I am building e-commerce site. In shopping cart. if i try to add to cart from the product its added. modal display successfully. second click to more increment quantity +5 and nothing modal display "The requested quantity for product is not available". Now i want to display modal when i click ..
I have my shopping cart, and for adding to cart i’m using ajax. It works, but i don’t know how to update total quantity number which located at the header. There is no inputs with a field for selection of quantity, a want it to increase after each pushing button "add to cart" by 1. ..
I have a problem with an ecommerce’s cart. In my controller when i use the first() property in my query the product that is added in my cart is always the same, the first that I click. This is my code: Controller: public function addToCart(Request $request) { $reference = $request->reference; $ean = $request->ean; $product = ..
Would you please see my problem… I have designed three category product Sp 2. Hp 3. Gp Three menu like image (included). enter image description here I have done my code like… <table class="table table-bordered"> <!– Table Header –> <thead> <tr> <th>#</th> <th>Image</th> <th>Product Name</th> <th>Net Weight</th> <th>Category</th> <th>Price</th> <th>Action</th> </tr> </thead> <tbody> @php $all_product ..
I am adding items to cart with ajax request but i don’t know how to update the cart with ajax response. This is my index.blade.php code from where i am adding items to cart with some inputs in cart: <form id="product-1"> @csrf <div class="modal-body cart-addon" style="margin-top: 20px"> <div class="food-item white"> <div class="row"> <div class="col-xs-12 col-sm-6 ..
This is a fully working Cart. It can add products and calculate the quantity and total price. but I want to take instructions from User and add it with the Products in Cart. This is the body from where I am adding product to Cart. <form action="{{ route(‘product.addToCart’) }}"> @csrf <input hidden name="products_id" id="products_id"> // ..
I use https://github.com/darryldecode/laravelshoppingcart I only have authentication by username without password The problem is the sessions When I am a guest, the session code is for example 9ot0CjCYUQpYR10ox43A9GoHVp6vliXuFFsoZlGU After registration it is renewed to a different code HXTc6LXNEW79QzvrvnKwi2N3IBQWwSroBfghOznR in config/auth.php ‘guards’ => [ ‘web’ => [ ‘driver’ => ‘session’, ‘provider’ => ‘customers’, ], ], ‘providers’ ..
i want to change the attribute "cantidad" inside my session(‘cart’) through a post form which have a input type="num" that will have the quantity to change on the session. But i cant change it with success , it doesnt do nothing. Session Code And the Update Code Where im wrong? Sorry for ask this , ..
i’m using laravel in my project , so when i add a product in the shop cart all the data is displayed except the product image. This is the cartcontroller.php: public function add(Request $request) { $produit=productmodel::find($request->id); Cart::add(array( ‘id’ =>$request->id, // inique row ID ‘name’ =>$request->product_name, ‘price’ => $request->product_price, ‘quantity’ =>$request->product_quantity, ‘attributes’ => array(‘photo’=>$request->product_image))); return redirect ..
I have a problem, i store a price in session in function of qty in my Cart, but i have a problem because its decal of -1 i have the price of qty 2 if i want to show the price of qty 3. This is the code of my update function in my controller: ..
I am developing an e-commerce website. On my cart page, the total price of an item should be updated as per the quantity of that item. https://github.com/darryldecode/laravelshoppingcart I installed this shopping cart package. How can I update the total price of an item according to its quantity? The item-total should be automatically updated when increasing(+) ..
{ "8": { "id": "8", "name": "Third Product", "price": 3000, "quantity": "1", "attributes": { "tax": 7.5, "shop": "Edificeweb", "image": "rp-4.jpg" }, "conditions": [] }, "9": { "id": "9", "name": "The fourth", "price": 200, "quantity": "1", "attributes": { "tax": 7.5, "shop": "Edificeweb", "image": "product-2.jpg" }, "conditions": [] } } I stored my cart as a json ..
here i am having the problem for to use UpdateOrCreate with Array,this is my Controller, here my extra_id is array field $cart = Cart::updateOrCreate([ ‘user_id’=> $user_id, ‘product_id’=>$id, ‘attribute_id’=>$request->attribute_id, ‘extra_id’ => $request->extra_id, ], [‘qty’=>DB::raw(‘qty + 1’)] ); } here i have used Casts to convert string into an array for that i have done this in ..
i tried to add shipping charge in two option, Ex – A = $10 B = $20 How to calculate with subtotal (i used bumbummen99 laravel shopping cart) My Code as like – Shipping Option: <div class="form-group" style="padding-bottom: 15px"> <select id="DeliAddress" onchange="UpdateOrderInfo(this.value)" name="customer_area" required="required" class="form-control"> <option selected="">Select Your Area</option> <option value="1">Area A</option> <option value="2">Area B</option> ..
I am working on an eCommerce project and I used darryldecode cart for add to cart, but I am having problems while implementing it. Is there any other library you have used OR if you have used darryldecode cart, can you help me with the implementation (and) or the source code? Thank You. Source: Laravel ..