将项目添加到购物车(darryldecode)AJAX Laravel 5.7

时间:2018-10-27 07:06:14

标签: php ajax laravel shopping-cart

我在pos网站上使用Laravel,并通过以下方式添加项目:

<a href=" ' . url('add-cart') . '/' . $row->product_id . ' " >
  <div class="col-lg-4 col-md-6 col-xs-6  shop-items filter-add-product noselect text-center" data-codebar="0000001" style=";padding:5px; border-right: solid 1px #DEDEDE;border-bottom: solid 1px #DEDEDE;">
    <img data-original="' . asset($row->product_image) . '" style="max-height: 64px; display: block;" class="img-responsive img-rounded lazy" src="' . asset($row->product_image) . '">
    <div class="caption text-center" style="padding:2px;overflow:hidden;"><strong class="item-grid-title">
      <span class="marquee_me"><small>' . $row->product_name . '</small></span></strong>
      <br><span class="align-center">৳ ' . $row->product_price . '</span>
    </div>
    <button class="col-md-11 col-lg-11 col-xs-11 btn btn-info" type="button" >Add to Card </button>
  </div>
</a>

您能建议AJAX解决方案在不刷新页面的情况下将商品添加到购物车吗?

0 个答案:

没有答案