Category : cart

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 = ..

Read more

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 ..

Read more

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 ..

Read more

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’ ..

Read more

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 ..

Read more

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(+) ..

Read more

{ "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 ..

Read more

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 ..

Read more

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> ..

Read more

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 ..

Read more