samedi 31 août 2019

Laravel cart - button and cart update

On the products page the button click links to add to cart page with the product id shown in the url however on the add to cart page the cart still shows no items in cart. Also the if statement relating to the session also doesn't appear to be working. So the problem is the cart is not updating.


@extends('layouts.master')

@section('title')
    Laravel product page
@endsection

@section('content')
@foreach($products->chunk(3) as $productChunk)



    <div class="row">
    @foreach($productChunk as $product)
    <div class="col-sm-6 col-md-4">
            <div class="thumbnail">
                <img src="" alt="..." class="img-responsive">
                <div class="caption">
                    <h3></h3>
                    <p class="description">""</p>
                    <div class="clearfix">
                        <div class="pull-left price">£</div>
                           <a href=""
                                   class="btn btn-success pull-right" role="button">Add to Cart</a>
                                @if(Session::has('success'))
       <div class="row">
          <div class="col-sm-6 col-md-4 col-md-offset-4 col-sm-offset-3">
                <div id="charge-message" class="alert alert-success">
                    
                   @endif

                    </div>
                </div>
            </div>
        </div>
    @endforeach


    </div>
   @endforeach
@endsection







from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32i89UV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire